Monday, October 10, 2011

Client side code to check user permissions


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();
The above code snippet checks whetehr the user has AddListItems or not

No comments:

Post a Comment