I'm having trouble finding a good way to determine the Access Rights for a given role. Is there a easy way to get a list of items, that a given role have been granted access to, without iterating the entire content tree?
1 Answer
Sitecore Powershell Extensions comes with a script which will return you all the items with security information on them. You can filter the data to specific path and select one account you are interested in.
You will get the information in form of a report. You can also have a sneak peak into the script which should be in /sitecore/system/Modules/PowerShell/Script Library/Content Reports/Reports/Content Audit/Items with security for an account
More information about the cmdlets
UPDATE
In case you would like to do this programmatically you can execute SQL query on the database:
SELECT * FROM [Sitecore_master].[dbo].[SharedFields] where fieldid = '{DEC8D2D5-E3CF-48B6-A653-8E69E2716641}'
-
I was looking for a way to do this from code. But I will try to see if the functionality used by the powershell plugin, could point me in the right way. Commented Nov 25, 2016 at 13:21
-
@MikkelNielsen you can always see how this is done in the script. I assume it iterates over all items but it's worth checking. Commented Nov 25, 2016 at 13:27
-
That would also be my idea. Im not a fan of this, but I guess there is no other way. Thanks. Commented Nov 25, 2016 at 13:34