다음을 통해 공유


SPDatabase.GrantAccess method (SecurityIdentifier, String)

Grants the specified user access to the database and adds the user to the specified role.

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

Syntax

'Declaration
Protected Friend Sub GrantAccess ( _
    sid As SecurityIdentifier, _
    role As String _
)
'Usage
Dim sid As SecurityIdentifier
Dim role As String

Me.GrantAccess(sid, role)
protected internal void GrantAccess(
    SecurityIdentifier sid,
    string role
)

Parameters

  • role
    Type: System.String

    The Microsoft SQL Server role in which to add the user.

See also

Reference

SPDatabase class

SPDatabase members

GrantAccess overload

Microsoft.SharePoint.Administration namespace