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.
GetUserEffectivePermissions
returns these base permissions. But how do you judge "Delete Items" is "higher" than "Create Items"?