SPBasePermissions: STSADM extension
Updated: 2008-08-15 This is an stsadm extension that gets or sets base permissions for roles / permissions levels in a site / collection. The role or permission level is added to the site / collection if it is not defined.
Operation name : GetPermission
Gets the SPBasePermissions for a role/permission level for a given URL
Syntax
stsadm -o getpermission
-url <full site url>
-role <role name>
Parameters
| Parameter | Value | Required | Description |
| url | Site / Collection URL | Yes | The full URL of the MOSS or WSS v3 Collection, Site or SubSite you want to view. Do not include page. |
| role | A valid role or permission level | Yes | Name of the role or permission level you want to get permissions for. This name is case sensitive. For a complete list of roles, use the enumroles stsadm operation. |
Operation name : SetPermission
Sets the SPBasePermissions for a role/permission level to a given URL
Syntax
stsadm -o setpermission
-url <full site url>
-role <role name>
-basepermissions <p1, p2, ..., pN>
Parameters
| Parameter | Value | Required | Description |
| url | Site / Collection URL | Yes | The full URL of the MOSS or WSS v3 Collection, Site or SubSite you want to view. Do not include page. |
| role | Role or permission level to modify | Yes | The role or permission level you want to set permissions for. |
| basepermissions | List of base permissions this role should have | Yes | This is a comma de-limited list of base permissions this role or permission level needs to have. |
Note
- If the role already exists, the SPWeb will be modified with the new base permissions.
- If the a role with that name does not exist in the SPWeb, a new role will be created and the base permissions attached to it.
- Inheritance from the parent site will be broken if you specify a child site.
- List of base permissions available here - [url:http://msdn.microsoft.com/microsoft.sharepoint.spbasepermissions.aspx|
|