1

I am working on a task to clean up all permissions by removing users that are given individual permissions and adding them to groups with same permission level.

There are multiple permission levels given for some of the users in the sites. So i need to find a way to get the highest effective permission a user will be having on the site, so that i will only need to add the user to only the group having that highest permission level.

I tried using spweb.GetUserEffectivePermissionInfo and spweb.GetUserEffectivePermissions but they are returning multiple values and i am not sure how to figure out the highest permission level from that.

Please help me get this done using as i am on a deadline here and I need to finish this ASAP. Any suggestions are welcome.Thanks in advance.

3
  • 2
    There's no such thing as a "higher" permission level. Users are assigned permission-levels (either directly or through a group membership). These permission-levels are made of base-permissions (like "Edit Item" or "View List"). GetUserEffectivePermissions returns these base permissions. But how do you judge "Delete Items" is "higher" than "Create Items"?
    – Evariste
    Commented Mar 30, 2016 at 8:42
  • Thanks for that info, so if I have move a user with directly given permission to a group, i will have to add them to multiple groups based on the permission levels the user is assigned? Commented Mar 30, 2016 at 8:46
  • You'd have to either add te user to multiple groups (each group having one permission-level assigned) or to one group with multiple levels assigned...
    – Evariste
    Commented Mar 30, 2016 at 8:49

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.