Skip to main content
.NET Framework 4.5.2+

PermissionSettingHelper.AddObjectPermission(IPermissionPolicyRole, Type, String, String, Nullable<SecurityPermissionState>) Method

Finds the first type permission for the specified type in the role and adds the object permission to it. If the appropriate type permission is not found, this method creates it.

Namespace: DevExpress.ExpressApp.Security

Assembly: DevExpress.ExpressApp.Security.v24.1.dll

Declaration

public static IPermissionPolicyObjectPermissionsObject AddObjectPermission(
    this IPermissionPolicyRole role,
    Type type,
    string operations,
    string criteria,
    SecurityPermissionState? state
)

Parameters

Name Type Description
role IPermissionPolicyRole

The target role for a new object permission.

type Type

This method finds the type permission for this type in the role.

operations String

The semicolon-separated list of security operations. The static SecurityOperations class defines operation names and their delimiter.

criteria String

The criteria expression that specifies the target object(s).

state Nullable<SecurityPermissionState>

A SecurityPermissionState enumeration value that specifies if access is granted or denied.

Returns

Type Description
DevExpress.Persistent.Base.IPermissionPolicyObjectPermissionsObject

The added object permission.

See Also