3

We recently added some permission sets to our managed package. We created them by point-and-click in our org and downloaded them via the Force.com migration tool.

We found that the files were huge and contained a lot of irrelevant permissions (set to false), like these:

<userPermissions>
    <enabled>false</enabled>
    <name>CanUseNewDashboardBuilder</name>
</userPermissions>
<userPermissions>
    <enabled>false</enabled>
    <name>ChatterComposeUiCodesnippet</name>
</userPermissions>
<userPermissions>
    <enabled>false</enabled>
    <name>ChatterEditOwnPost</name>
</userPermissions>

I say "irrelevant" because our permission sets include only object and field permissions, no user permissions.

Is it safe to clean all those lines and keep only the lines that actually have some permissions enabled?

A not-too-old post by Andrew Fawcett here seems to indicate that cleansing permission sets is not only possible but recommended. Is that still the case?

2

Omitted values will remain the same as they were before deployment. Therefore, if your permission set includes, for example, just one enabled field, then that's the only field you need in your file. There's definitely no reason to keep all the false values around, and may actually hinder future deployments if some unrelated field or object changes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.