Back to Devexpress

PermissionPolicyRole Class

expressappframework-devexpress-dot-persistent-dot-baseimpl-dot-ef-dot-permissionpolicy-583a2a7c.md

latest7.8 KB
Original Source

PermissionPolicyRole Class

A security role that supports the Allow/Deny Permission Policies.

Namespace : DevExpress.Persistent.BaseImpl.EF.PermissionPolicy

Assembly : DevExpress.Persistent.BaseImpl.EFCore.v25.2.dll

NuGet Package : DevExpress.Persistent.BaseImpl.EFCore

Declaration

csharp
[ImageName("BO_Role")]
public class PermissionPolicyRole :
    PermissionPolicyRoleBase,
    IPermissionPolicyRoleWithUsers,
    ICanInitializeRole
vb
<ImageName("BO_Role")>
Public Class PermissionPolicyRole
    Inherits PermissionPolicyRoleBase
    Implements IPermissionPolicyRoleWithUsers,
               ICanInitializeRole

Remarks

In XAF applications, permissions are not assigned to a user directly. Users have roles, which in turn are characterized by a permission set. So, each user has one or more roles that determine what actions can be performed. The list of users associated with the current role is exposed via the PermissionPolicyRole.Users property.

Refer to the How to: Implement Custom Security Objects (Users, Roles, Operation Permissions) topic for an example of how to implement a custom Role.

Tip

You can use extension methods declared in the static PermissionSettingHelper class with object instances of the PermissionPolicyRole type. Call these extension methods from the ModuleUpdater.UpdateDatabaseAfterUpdateSchema method implemented in the Updater.cs file to easily configure predefined permissions in code.

Implements

IXafEntityObject

IObjectSpaceLink

IPermissionPolicyRole

IPermissionPolicyRoleWithUsers

Inheritance

Object BaseObject PermissionPolicyRoleBase PermissionPolicyRole

Extension Methods

Show 19 items

FindFirstTypePermission<T>()

FindFirstTypePermission(Type)

EnsureTypePermission<T>()

EnsureTypePermission(Type)

EnsureNavigationPermission(String)

AddNavigationPermission(String, Nullable<SecurityPermissionState>)

AddActionPermission(String)

SetTypePermission<T>(String, Nullable<SecurityPermissionState>)

SetTypePermission(Type, String, Nullable<SecurityPermissionState>)

AddTypePermission<T>(String, Nullable<SecurityPermissionState>)

AddTypePermission(Type, String, Nullable<SecurityPermissionState>)

AddObjectPermission(Type, String, String, Nullable<SecurityPermissionState>)

AddObjectPermission<T>(String, String, Nullable<SecurityPermissionState>)

AddObjectPermissionFromLambda<T>(String, Expression<Func<T, Boolean>>, Nullable<SecurityPermissionState>)

AddMemberPermission<T>(String, String, String, Nullable<SecurityPermissionState>)

AddMemberPermissionFromLambda<T>(String, String, Expression<Func<T, Boolean>>, Nullable<SecurityPermissionState>)

AddMemberPermission(Type, String, String, String, Nullable<SecurityPermissionState>)

AddTypePermissionsRecursively<T>(String, Nullable<SecurityPermissionState>, ITypesInfo)

AddTypePermissionsRecursively(Type, String, Nullable<SecurityPermissionState>, ITypesInfo)

See Also

PermissionPolicyRole Members

DevExpress.Persistent.BaseImpl.EF.PermissionPolicy Namespace