You can check for a specific user permission in client side code using the following snipppet
BasePermissions bp = new BasePermissions();
bp.Set(PermissionKind.AddListItems);
ClientResult<bool> manageWeb = context.Web.DoesUserHavePermissions(bp); context.ExecuteQuery();
bp.Set(PermissionKind.AddListItems);
ClientResult<bool> manageWeb = context.Web.DoesUserHavePermissions(bp); context.ExecuteQuery();
The above code snippet checks whetehr the user has AddListItems or not
No comments:
Post a Comment