27 April 2011

Checking specific set of permission for current user

bool hasManagePermission = false;
 SPSecurity.RunWithElevatedPrivileges(delegate()
 {//how to check current user have a specific set of permission(s)
   //eg. here we are checking the user have ManagePermissions
    hasManagePermission = Web.DoesUserHavePermissions(SPBasePermissions.ManagePermissions);
 });

No comments:

Post a Comment