views:

315

answers:

2

The SharePoint web service usergroup.asmx has two methods to add role definitions to a site collection:

Both have the exact same description: "Adds a role definition to the current site collection."

Does anybody know if there is a difference between the two? So far, the only difference I see is that AddRoleDef takes a 64 bit unsigned integer as one of the parameters, and AddRole takes a 32 bit unsigned integer.

+1  A: 

Hey there, I work for Microsoft and am the PM responsible for permissions management UI in SharePoint vNext.

An 'SPGroup' is a 'Group' in the UI - a logical group of users or directory groups

SPGroup on MSDN

A 'role' is an obsolete term for a 'Permission Level' in the UI

SPRole on MSDN

A 'role definition' is a 'Permission Level' in the UI - a set of 'permissions' ('rights' programatically) that can be thought of as specific base actions a user can perform eg. add item. Authorization is done against a user's having been granted these permissions.

SPRoleDefinition on MSDN

History: In SharePoint v2 we had users / directory groups assigned roles (sets of permissions). In SharePoint v3 we introduced SharePoint groups,

Kevin Davis
@Kevin--I did a test and called the AddRole and AddRoleDef methods. Both added new Permission Levels to my site. There is an AddGroup method in usergroup.asmx which I assume adds what is called a Group in the UI. This seems to be a little different than what your answer suggests. Maybe this is just an inconsistency between the web service API and the SharePoint object model.
Jim
sorry about that.. corrected answer above :)
Kevin Davis
A: 

Just a guess here, but maybe Microsoft plans on adding more rights and that would require more than a 32 bit integer to hold the permissions mask; hence the addition of the same method with a 64 bit integer.

Kit Menke