SPAcl<T>.Add method (String, T, T)

Adds a new access control entry (ACE) to the access control list, overwriting any existing ACE for the specified principal based on the specified principal name, granted rights, and denied rights.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Function Add ( _
    principalName As String, _
    grantRightsMask As T, _
    denyRightsMask As T _
) As SPAce(Of T)
'Usage
Dim instance As SPAcl
Dim principalName As String
Dim grantRightsMask As T
Dim denyRightsMask As T
Dim returnValue As SPAce(Of T)

returnValue = instance.Add(principalName, _
    grantRightsMask, denyRightsMask)
public SPAce<T> Add(
    string principalName,
    T grantRightsMask,
    T denyRightsMask
)

Parameters

  • principalName
    Type: System.String

    A string that contains the name of the principal.

  • grantRightsMask
    Type: T

    An object that represents the rights to be granted.

  • denyRightsMask
    Type: T

    An object that represents the rights to be denied.

Return value

Type: Microsoft.SharePoint.Administration.SPAce<T>
An SPAce<T> object that represents the new ACE.

See also

Reference

SPAcl<T> class

SPAcl<T> members

Add overload

Microsoft.SharePoint.Administration namespace