SPPolicyRoleCollection.Add Method (String, String, SPBasePermissions, SPBasePermissions)
Adds a policy role to the collection based on the specified policy role name, description, granted rights, and denied rights.
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public Function Add ( _
name As String, _
description As String, _
grantRightsMask As SPBasePermissions, _
denyRightsMask As SPBasePermissions _
) As SPPolicyRole
'Usage
Dim instance As SPPolicyRoleCollection
Dim name As String
Dim description As String
Dim grantRightsMask As SPBasePermissions
Dim denyRightsMask As SPBasePermissions
Dim returnValue As SPPolicyRole
returnValue = instance.Add(name, description, _
grantRightsMask, denyRightsMask)
public SPPolicyRole Add(
string name,
string description,
SPBasePermissions grantRightsMask,
SPBasePermissions denyRightsMask
)
Parameters
name
Type: System.StringA string that contains the name of the policy role.
description
Type: System.StringA string that contains a description of the policy role.
grantRightsMask
Type: Microsoft.SharePoint.SPBasePermissionsAn SPBasePermissions value that specifies the rights that are granted by the new policy role.
denyRightsMask
Type: Microsoft.SharePoint.SPBasePermissionsAn SPBasePermissions value that specifies the rights that are denied by the new policy role.
Return Value
Type: Microsoft.SharePoint.Administration.SPPolicyRole
An SPPolicyRole object that represents the new policy role.