You need to sign in to do that
Don't have an account?
Bryan Leaman 6
How can I check for Modify All Data permission in Apex?
I love how we can filter lightning components on standard permissions rather than looking for specific profile name or creating custom permissions. For example, instead of someting like Profile > Name = 'System Administrator' I can show a component based on "Permissions > Standard Permissions > Modify All Data = true".
But I'm unable to find a way to make this same kind of determination in Apex. My use-case is that I'd like to condition editability of some data based on the status of the record *AND* whether the user has been granted a custom permission *or* they are a system admin (so I don't have to keep adding all custom permissions to our system administrators). But I've been unable to find a way to check for "Modify All Data" authority on the running user.
But I'm unable to find a way to make this same kind of determination in Apex. My use-case is that I'd like to condition editability of some data based on the status of the record *AND* whether the user has been granted a custom permission *or* they are a system admin (so I don't have to keep adding all custom permissions to our system administrators). But I've been unable to find a way to check for "Modify All Data" authority on the running user.
Similar kind of question answered here.
https://salesforce.stackexchange.com/questions/44237/how-can-we-access-modify-all-data-setting-from-profile-in-apex
If the above information helps, Please mark it as best answer.
Thanks!!
All Answers
Similar kind of question answered here.
https://salesforce.stackexchange.com/questions/44237/how-can-we-access-modify-all-data-setting-from-profile-in-apex
If the above information helps, Please mark it as best answer.
Thanks!!