This code will print out all the differences between two given security roles. Useful when you need to sanity check your work or debug security issues.
Differences between Marketing Manager and Marketing Professional
Marketing Manager has prvActivateBusinessProcessFlow: Global
Marketing Manager has prvActivateSynchronousWorkflow: Global
Marketing Manager has prvAppendCompetitor: Global
Marketing Professional has prvActivateSynchronousWorkflow: User
Marketing Professional has prvAppendEmailTemplate: Bu
When debugging security issues it can be useful to compare the privileges of a functioning user with a non-functioning user.
The code in this post will print out all the privilege differences between two given users.
Differences between firstname.lastname@example.org and email@example.com
firstname.lastname@example.org has BU:root, PRIV:prvCreateAccount, DEPTH:Global
email@example.com has BU:root, PRIV:prvCreateActivity, DEPTH:Global
firstname.lastname@example.org has BU:root, PRIV:prvCreateArticle, DEPTH:Global
email@example.com has BU:sub, PRIV:prvCreateActivity, DEPTH:Deep
firstname.lastname@example.org has BU:sub, PRIV:prvCreateArticle, DEPTH:Global