We have a permission set with this metadata:
<userPermissions> <enabled>true</enabled> <name>ModifyAllData</name> </userPermissions>
Deploying this to a scratch org returns the error:
Permission ModifyAllData depends on permission(s): EditPublicReports, EditReports, ManageDashboards
The problem is, if I add this line to the permission set:
<userPermissions> <enabled>true</enabled> <name>EditPublicReports</name> </userPermissions>
Then I am no longer able to deploy to my sandbox, with the error "Unknown user permission: EditPublicReports".
The only stackexchange result for the above error is this one which is now entirely out of date.
How can I solve this error so that we can deploy this permissionset both to scratch orgs, and to sandboxes?