Adding Role Definitions #369
-
Hello all, I am trying to define specific RoleDefinitions for multiple folders and files. Given the folder or file's serverRelativeUrl and a set of PrincipalIds and string[]s containing the permission names, I want to do something like this: var source = context.Web.GetFolderByServerRelativeUrl(path, x => x.ItemCount, x => x.Folders, x => x.Files, x => x.Parent, x => x.ListItemAllFields); foreach (var permission in permissions) This code is failing on the AddRoleDefinitions() call however. Does anyone have any suggestions about making it work? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
@kentlhastings : I think the AddRoleDefinitions call failed when using ListItemAllFields (just like BreakRoleInheritance)...I've just fixed this, so tomorrow things should work. If not, please create an issue in the issue list. |
Beta Was this translation helpful? Give feedback.
@kentlhastings : I think the AddRoleDefinitions call failed when using ListItemAllFields (just like BreakRoleInheritance)...I've just fixed this, so tomorrow things should work. If not, please create an issue in the issue list.