User.Deny User.Deny User.Deny Method

Definition

Denies access to the specified permission for the specified grantees on the database user.

Overloads

Deny(ObjectPermissionSet, String) Deny(ObjectPermissionSet, String) Deny(ObjectPermissionSet, String)

Denies access to the specified permission for the specified grantee on the database user.

Deny(ObjectPermissionSet, String[]) Deny(ObjectPermissionSet, String[]) Deny(ObjectPermissionSet, String[])

Denies access to the specified permission for the specified grantees on the database user.

Deny(ObjectPermissionSet, String, Boolean) Deny(ObjectPermissionSet, String, Boolean) Deny(ObjectPermissionSet, String, Boolean)

Denies access to the specified permission for the specified grantee and other users whom the grantee granted access on the database user.

Deny(ObjectPermissionSet, String[], Boolean) Deny(ObjectPermissionSet, String[], Boolean) Deny(ObjectPermissionSet, String[], Boolean)

Denies access to the specified permission for the specified grantees on the database user.

Deny(ObjectPermissionSet, String) Deny(ObjectPermissionSet, String) Deny(ObjectPermissionSet, String)

Denies access to the specified permission for the specified grantee on the database user.

public:
 virtual void Deny(Microsoft::SqlServer::Management::Smo::ObjectPermissionSet ^ permission, System::String ^ granteeName);
public void Deny (Microsoft.SqlServer.Management.Smo.ObjectPermissionSet permission, string granteeName);
Public Sub Deny (permission As ObjectPermissionSet, granteeName As String)
Parameters
permission
ObjectPermissionSet ObjectPermissionSet ObjectPermissionSet

An ObjectPermissionSet object value that specifies the permission.

granteeName
String String String

A String value that specifies the grantee to be denied access to the permission.

Implements

Examples

Granting, Revoking, and Denying Permissions

Deny(ObjectPermissionSet, String[]) Deny(ObjectPermissionSet, String[]) Deny(ObjectPermissionSet, String[])

Denies access to the specified permission for the specified grantees on the database user.

public:
 virtual void Deny(Microsoft::SqlServer::Management::Smo::ObjectPermissionSet ^ permission, cli::array <System::String ^> ^ granteeNames);
public void Deny (Microsoft.SqlServer.Management.Smo.ObjectPermissionSet permission, string[] granteeNames);
Public Sub Deny (permission As ObjectPermissionSet, granteeNames As String())
Parameters
permission
ObjectPermissionSet ObjectPermissionSet ObjectPermissionSet

An ObjectPermissionSet object value that specifies the permission.

granteeNames
String[]

A String array that specifies a list of grantees to be denied access to the permission.

Implements

Examples

Granting, Revoking, and Denying Permissions

Deny(ObjectPermissionSet, String, Boolean) Deny(ObjectPermissionSet, String, Boolean) Deny(ObjectPermissionSet, String, Boolean)

Denies access to the specified permission for the specified grantee and other users whom the grantee granted access on the database user.

public:
 virtual void Deny(Microsoft::SqlServer::Management::Smo::ObjectPermissionSet ^ permission, System::String ^ granteeName, bool cascade);
public void Deny (Microsoft.SqlServer.Management.Smo.ObjectPermissionSet permission, string granteeName, bool cascade);
Public Sub Deny (permission As ObjectPermissionSet, granteeName As String, cascade As Boolean)
Parameters
permission
ObjectPermissionSet ObjectPermissionSet ObjectPermissionSet

An ObjectPermissionSet object value that specifies the permission.

granteeName
String String String

A String value that specifies the grantee to be denied access to the permission.

cascade
Boolean Boolean Boolean

A Boolean property that specifies whether users whom the grantee has granted access to the permission are also denied access to the permission.

If True, the grantee and users to whom the grantee granted access to the permission are all denied access to the permission.

If False, only the grantee is denied access to the permission.

Implements

Examples

Granting, Revoking, and Denying Permissions

Deny(ObjectPermissionSet, String[], Boolean) Deny(ObjectPermissionSet, String[], Boolean) Deny(ObjectPermissionSet, String[], Boolean)

Denies access to the specified permission for the specified grantees on the database user.

public:
 virtual void Deny(Microsoft::SqlServer::Management::Smo::ObjectPermissionSet ^ permission, cli::array <System::String ^> ^ granteeNames, bool cascade);
public void Deny (Microsoft.SqlServer.Management.Smo.ObjectPermissionSet permission, string[] granteeNames, bool cascade);
Public Sub Deny (permission As ObjectPermissionSet, granteeNames As String(), cascade As Boolean)
Parameters
permission
ObjectPermissionSet ObjectPermissionSet ObjectPermissionSet

An ObjectPermissionSet object value that specifies the permission.

granteeNames
String[]

A String array that specifies a list of grantees to be denied access to the permission.

cascade
Boolean Boolean Boolean

A Boolean property that specifies whether users whom the grantee has granted access to the permission are also denied access to the permission.

If True, the grantee and users to whom the grantee granted access to the permission are all denied access to the permission.

If False, only the grantee is denied access to the permission.

Implements

Examples

Granting, Revoking, and Denying Permissions

Applies to