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 email@example.com and firstname.lastname@example.org
email@example.com has BU:root, PRIV:prvCreateAccount, DEPTH:Global
firstname.lastname@example.org has BU:root, PRIV:prvCreateActivity, DEPTH:Global
email@example.com has BU:root, PRIV:prvCreateArticle, DEPTH:Global
firstname.lastname@example.org has BU:sub, PRIV:prvCreateActivity, DEPTH:Deep
email@example.com has BU:sub, PRIV:prvCreateArticle, DEPTH:Global