There is a simple function to add permissions to collection:
// Set up permissions. BasePermissions permissions = new BasePermissions(); permissions.Set(PermissionKind.ViewListItems); permissions.Set(PermissionKind.AddListItems); permissions.Set(PermissionKind.EditListItems); permissions.Set(PermissionKind.DeleteListItems);
But how to get assigned permissions back from existing BasePermissions object? I cannot find a function for that. There is only a function to check, if specific kind of permission is assigned or not. How to get the list of all assigned PermissionKind's?