Don't miss out Virtual Happy Hour this Friday (April 26).
Try our conversational search powered by Generative AI!
AI OnAI Off
Don't miss out Virtual Happy Hour this Friday (April 26).
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