Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
ISecurable securable = content as ISecurable; if (securable == null) return; ISecurityDescriptor securityDescriptor = securable.GetSecurityDescriptor(); var rights = securityDescriptor.GetAccessLevel(user);
For the googlers and very curious listeners:
I ended up using
IContentSecurityDescriptorExtensions.ToRawACEArray(content)
instead, because I needed to do a role check in a filter. But I got on the right track with the provided answer.
/Marten
Hello,
Has anyone a good code snippet on how to programmatically read the access rights set on an IContent object? I would use ACL if I was working with pages, but I need it for media and block content items.
Thanks,
/Marten