Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The following code will fail if the user doesnot have Admin previlage
SPRoleCollection RC = CurrentWeb.CurrentUser.Roles;
The CurrentWeb.CurrentUser.Roles method requires Manage Site Groups permission and the impersonation does not work with SPRoleCollection
RESOLUTION:
-Write a custom sharepoint webservice and pass the administrator (networkcredentials) credentials to the webservice to retrieve the roles.