IsGrantedExtensions.CanDelete<T>(IRequestSecurityStrategy, IObjectSpace) Method
Checks whether the current user can delete objects of the specified type.
Namespace: DevExpress.ExpressApp.Security
Assembly: DevExpress.ExpressApp.Security.v25.1.dll
NuGet Package: DevExpress.ExpressApp.Security
Declaration
Parameters
Name | Type | Description |
---|---|---|
security | IRequestSecurityStrategy | An object that specifies the application’s security strategy. |
objectSpace | IObjectSpace | An Object Space used to obtain data to calculate this security criterion. |
Type Parameters
Name | Description |
---|---|
T | An object type. |
Returns
Type | Description |
---|---|
Boolean |
|
Remarks
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Security;
// ...
public class CheckDeletePermissionController : ObjectViewController<ListView, Contact> {
protected override void OnActivated() {
base.OnActivated();
SecurityStrategy securityStrategy = Application.GetSecurityStrategy();
if (!securityStrategy.CanDelete<Department>(ObjectSpace)) {
// ...
}
}
}
See Also