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)
Available in Sandboxed Solutions: No
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
sid
Type: System.Security.Principal.SecurityIdentifierThe security identifier of the user.
role
Type: System.StringThe Microsoft SQL Server role in which to add the user.