Get roles for document (treenode)

Rita Mikusch asked on December 21, 2016 19:04

Hi,

I'm writing a custom AuthorizeDocument handler. And in this handler I'd like to get the list of ROLES that have READ permission on the document.

Is this even possible? I can easily get the document (TreeNode), and the permission (string) in question, but I can't figure out how to take those two values and get the roles.

Thank you.

Correct Answer

Roman Hutnyk answered on December 21, 2016 20:39

Yes, this is possible. CMS_ACL and CMS_ACLItem tables keep data your looking for.

Here are some API examples for page permissions.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Rita Mikusch answered on December 21, 2016 20:51

Excellent, thank you! I never thought of going to the database tables for this data.

I want certain things to happen if a user belonging to RoleX accesses a document that RoleX has READ permissions for. (I could have done this differently using different document types along with SecurityEvents.AuthorizeClass ... but that would have caused other headaches.)

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.