Share via


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)
Available in Sandboxed Solutions: No

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