0

How can I download only those permission that are set to 'true'?
When I create permissionset and download it through FORCE.COM IDE (eclipse) I received thousands unnecessary permissions. It is difficult to manage the file.
Does anyone know how could I trim or remove permission that are set to false?
I think doing it manually is not proper way.

<userPermissions>
    <enabled>false</enabled>
    <name>CanUseNewDashboardBuilder</name> 
</userPermissions> 
<userPermissions>
    <enabled>false</enabled>
    <name>ChatterComposeUiCodesnippet</name> 
</userPermissions> 
<userPermissions>
    <enabled>false</enabled>
    <name>ChatterEditOwnPost</name> 
</userPermissions>
1
  • you can write small tool (e.g. in Java) that manipulate the xml, not sure it worth it. Usually I create permissionSet once, refresh to with eclipse and delete manually all except true permission. It usually not going to be changed too often.
    – Liron C
    Sep 17, 2017 at 8:18

1 Answer 1

0

you can open the large file in a text-editor that supports "regex" searching. Here is a screen recording of the proper regex needed to find all occurrences of the nodes that you care about. If you're using Sublime Text 3 you can perform the regex search, and click "find all" to select all of the matches. Then Copy it to your clipboard and paste it into a new file to get rid of the stuff you don't care about. See it done here https://gust.box.com/s/kr6ynb2e016xfjffzsl55w5sl1g15vqa and let me know if you have any questions. Good luck!

here too <userPermissions> <enabled>true[\s\S]*?</userPermissions>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .