IsGrantedExtensions Class
Extends the SecurityStrategy class with methods to check permissions.
Namespace: DevExpress.ExpressApp.Security
Assembly: DevExpress.ExpressApp.Security.v24.1.dll
NuGet Package: DevExpress.ExpressApp.Security
Declaration
Remarks
This class provides extension methods to check permissions for CRUD and navigate operations. You can check permissions for a current user, specific user or particular role.
Note
Middle Tier Security with XPO doesn’t support these methods.
Methods for a Current User
Create Operation
Read Operation
- CanRead(this SecurityStrategy security, Type type, string memberName = null)
- CanRead(this SecurityStrategy security, object targetObject, string memberName = null)
- CanRead(this SecurityStrategy security, Type type, IObjectSpace objectSpace, object targetObjectKey, string memberName = null)
- CanRead<T>(this SecurityStrategy security, string memberName = null)
- CanRead<T>(this SecurityStrategy security, IObjectSpace objectSpace, object targetObjectKey, string memberName = null)
Write Operation
- CanWrite(this SecurityStrategy security, Type type, string memberName = null)
- CanWrite(this SecurityStrategy security, object targetObject, string memberName = null)
- CanWrite(this SecurityStrategy security, Type type, IObjectSpace objectSpace, object targetObjectKey, string memberName = null)
- CanWrite<T>(this SecurityStrategy security, string memberName = null)
- CanWrite<T>(this SecurityStrategy security, IObjectSpace objectSpace, object targetObjectKey, string memberName = null)
Delete Operation
- CanDelete(this SecurityStrategy security, object targetObject)
- CanDelete(this SecurityStrategy security, Type type)
- CanDelete(this SecurityStrategy security, Type type, IObjectSpace objectSpace, object targetObjectKey)
- CanDelete<T>(this SecurityStrategy security)
- CanDelete<T>(this SecurityStrategy security, IObjectSpace objectSpace, object targetObjectKey)
Navigate Operation
Action Execution
Methods for a Specific User
Create Operation
- CanCreateByUser(this SecurityStrategy security, IPermissionPolicyUser targetUser, Type type)
- CanCreateByUser<T>(this SecurityStrategy security, IPermissionPolicyUser targetUser)
Read Operation
- CanReadByUser(this SecurityStrategy security, IPermissionPolicyUser targetUser, object targetObject, string memberName = null)
- CanReadByUser(this SecurityStrategy security, IPermissionPolicyUser targetUser, Type type, string memberName = null)
- CanReadByUser(this SecurityStrategy security, IPermissionPolicyUser targetUser, Type type, IObjectSpace objectSpace, object targetObjectKey, string memberName = null)
- CanReadByUser<T>(this SecurityStrategy security, IPermissionPolicyUser targetUser, string memberName = null)
- CanReadByUser<T>(this SecurityStrategy security, IPermissionPolicyUser targetUser, IObjectSpace objectSpace, object targetObjectKey, string memberName = null)
Write Operation
- CanWriteByUser(this SecurityStrategy security, IPermissionPolicyUser targetUser, Type type, string memberName = null)
- CanWriteByUser(this SecurityStrategy security, IPermissionPolicyUser targetUser, object targetObject, string memberName = null)
- CanWriteByUser(this SecurityStrategy security, IPermissionPolicyUser targetUser, Type type, IObjectSpace objectSpace, object targetObjectKey, string memberName = null)
- CanWriteByUser<T>(this SecurityStrategy security, IPermissionPolicyUser targetUser, string memberName = null)
- CanWriteByUser<T>(this SecurityStrategy security, IPermissionPolicyUser targetUser, IObjectSpace objectSpace, object targetObjectKey, string memberName = null)
Delete Operation
- CanDeleteByUser(this SecurityStrategy security, IPermissionPolicyUser targetUser, Type type)
- CanDeleteByUser(this SecurityStrategy security, IPermissionPolicyUser targetUser, object targetObject)
- CanDeleteByUser(this SecurityStrategy security, IPermissionPolicyUser targetUser, Type type, IObjectSpace objectSpace, object targetObjectKey)
- CanDeleteByUser<T>(this SecurityStrategy security, IPermissionPolicyUser targetUser)
- CanDeleteByUser<T>(this SecurityStrategy security, IPermissionPolicyUser targetUser, IObjectSpace objectSpace, object targetObjectKey)
Navigate Operation
- CanNavigateByUser(this SecurityStrategy security, IPermissionPolicyUser targetUser, string itemPath)
Action Execution
Methods for a Specific Role
Create Operation
- CanCreateByRole(this SecurityStrategy security, IPermissionPolicyRole targetRole, Type type)
- CanCreateByRole<T>(this SecurityStrategy security, IPermissionPolicyRole targetRole)
Read Operation
- CanReadByRole(this SecurityStrategy security, IPermissionPolicyRole targetRole, Type type, string memberName = null)
- CanReadByRole(this SecurityStrategy security, IPermissionPolicyRole targetRole, object targetObject, string memberName = null)
- CanReadByRole(this SecurityStrategy security, IPermissionPolicyRole targetRole, Type type, IObjectSpace objectSpace, object targetObjectKey, string memberName = null)
- CanReadByRole<T>(this SecurityStrategy security, IPermissionPolicyRole targetRole, string memberName = null)
- CanReadByRole<T>(this SecurityStrategy security, IPermissionPolicyRole targetRole, IObjectSpace objectSpace, object targetObjectKey, string memberName = null)
Write Operation
- CanWriteByRole(this SecurityStrategy security, IPermissionPolicyRole targetRole, Type type, string memberName = null)
- CanWriteByRole(this SecurityStrategy security, IPermissionPolicyRole targetRole, object targetObject, string memberName = null)
- CanWriteByRole(this SecurityStrategy security, IPermissionPolicyRole targetRole, Type type, IObjectSpace objectSpace, object targetObjectKey, string memberName = null)
- CanWriteByRole<T>(this SecurityStrategy security, IPermissionPolicyRole targetRole, string memberName = null)
- CanWriteByRole<T>(this SecurityStrategy security, IPermissionPolicyRole targetRole, IObjectSpace objectSpace, object targetObjectKey, string memberName = null)
Delete Operation
- CanDeleteByRole(this SecurityStrategy security, IPermissionPolicyRole targetRole, object targetObject)
- CanDeleteByRole(this SecurityStrategy security, IPermissionPolicyRole targetRole, Type type)
- CanDeleteByRole(this SecurityStrategy security, IPermissionPolicyRole targetRole, Type type, IObjectSpace objectSpace, object targetObjectKey)
- CanDeleteByRole<T>(this SecurityStrategy security, IPermissionPolicyRole targetRole)
- CanDeleteByRole<T>(this SecurityStrategy security, IPermissionPolicyRole targetRole, IObjectSpace objectSpace, object targetObjectKey)
Navigate Operation
- CanNavigateByRole(this SecurityStrategy security, IPermissionPolicyRole targetRole, string itemPath)
Action Execution
Inheritance
Object
IsGrantedExtensions
See Also