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.
ISecurable securable = content as ISecurable;
if (securable == null)
ISecurityDescriptor securityDescriptor = securable.GetSecurityDescriptor();
var rights = securityDescriptor.GetAccessLevel(user);
Thank you, Valdis!
For the googlers and very curious listeners: I ended up using
instead, because I needed to do a role check in a filter. But I got on the right track with the provided answer.