次の方法で共有


SPAcl<T>.Add method (String, String, Byte[], 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, principal display name, security identifier, granted rights, and denied rights.

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

Syntax

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

returnValue = instance.Add(principalName, _
    displayName, securityIdentifier, _
    grantRightsMask, denyRightsMask)
public SPAce<T> Add(
    string principalName,
    string displayName,
    byte[] securityIdentifier,
    T grantRightsMask,
    T denyRightsMask
)

Parameters

  • principalName
    Type: System.String

    A string that contains the login name of the principal.

  • displayName
    Type: System.String

    A string that contains the display name of the principal.

  • securityIdentifier
    Type: []

    A byte array that contains the security identifier bytes for a Windows 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