Don't know how to google for such, but is there a way to query all the items where
- Permissions are unique to listitem
- These unique permissions contains assignment for specific group X.
Don't know how to google for such, but is there a way to query all the items where
I don't think you can do this by shaping a CAML query and using the SPQuery object to get the items in this way.
My thinking would be to get all items, and loop through them testing for the HasUniqueRoleAssignments and RoleAssignments properties.
You will have to loop through the items and inspect the permissions item per item and update them if relevant. The more items you have the longer it takes. So not really a great solution.
An other solution is using the credentials of a user that is only member of group x. SharePoint automatically takes permissions into account. So if you connect to the list using that user, you should only get the items on which the user has permissions. Use the NetworkCredentials class for doing this.
Then use a CAML query to update your items.
--W