IsGrantedExtensions.CanCreate(IRequestSecurityStrategy, Type, IObjectSpace) Method
Checks whether the current user can create 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. |
| type | Type | The object’s type. |
| objectSpace | IObjectSpace | An Object Space used to obtain data to calculate this security criterion. |
Returns
| Type | Description |
|---|---|
| Boolean |
|
Remarks
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Security;
// ...
public class CheckCreatePermissionController : ViewController<ListView> {
protected override void OnActivated() {
base.OnActivated();
SecurityStrategy securityStrategy = Application.GetSecurityStrategy();
if (!securityStrategy.CanCreate(View.ObjectTypeInfo.Type, ObjectSpace)) {
// ...
}
}
}
See Also