Metoda ServiceContract.Grant (ObjectPermissionSet, String, Boolean, String)
Udziela dostępu do określonych uprawnień i możliwość udostępnienia innym użytkownikom określonej grantee usługa kontrakt.
Przestrzeń nazw: Microsoft.SqlServer.Management.Smo.Broker
Zestaw: Microsoft.SqlServer.Smo (w Microsoft.SqlServer.Smo.dll)
Składnia
'Deklaracja
Public Sub Grant ( _
permission As ObjectPermissionSet, _
granteeName As String, _
grantGrant As Boolean, _
asRole As String _
)
'Użycie
Dim instance As ServiceContract
Dim permission As ObjectPermissionSet
Dim granteeName As String
Dim grantGrant As Boolean
Dim asRole As String
instance.Grant(permission, granteeName, _
grantGrant, asRole)
public void Grant(
ObjectPermissionSet permission,
string granteeName,
bool grantGrant,
string asRole
)
public:
virtual void Grant(
ObjectPermissionSet^ permission,
String^ granteeName,
bool grantGrant,
String^ asRole
) sealed
abstract Grant :
permission:ObjectPermissionSet *
granteeName:string *
grantGrant:bool *
asRole:string -> unit
override Grant :
permission:ObjectPermissionSet *
granteeName:string *
grantGrant:bool *
asRole:string -> unit
public final function Grant(
permission : ObjectPermissionSet,
granteeName : String,
grantGrant : boolean,
asRole : String
)
Parametry
- permission
Typ: Microsoft.SqlServer.Management.Smo.ObjectPermissionSet
ObjectPermissionSet Obiekt, który określa uprawnienia.
- granteeName
Typ: System.String
A String wartość określająca grantee, aby odmówić dostępu do uprawnień.
- grantGrant
Typ: System.Boolean
A Boolean właściwość, która określa, czy grantee jest możliwość udzielenia dostępu do ServiceContract obiektu dla innych użytkowników.
Jeśli True, grantee jest możliwość udzielenia dostępu do innych użytkowników usługa kontrakt.
Jeśli ma wartość FAŁSZ, grantee jest nie możliwość udzielenia dostępu do innych użytkowników usługa kontrakt.
- asRole
Typ: System.String
A String wartość, która określa rolę użytkownika zakłada przyznając dostęp do usługa kontrakt do innych użytkowników.Ten parametr służy do stypendystów, którzy są członkami więcej niż jednej roli.
Implementacje
IObjectPermission.Grant(ObjectPermissionSet, String, Boolean, String)