void ReloadPermissions() { if (SecuritySystem.Instance is ISecurityComplex) { if (SecuritySystem.CurrentUser != null && !PermissionsReloaded) { SecuritySystem.ReloadPermissions(); PermissionsReloaded = true; } } }
protected internal virtual void ControllerOnCustomShowNavigationItem(object sender, CustomShowNavigationItemEventArgs args) { if (args.FitToObjectType(Application, typeof(ModelDifferenceObject)) && SecuritySystem.Instance is ISecurityComplex) { SecuritySystem.ReloadPermissions(); if (!SecuritySystemExtensions.IsGranted(new EditModelPermission(ModelAccessModifier.Allow), false)) { args.Handled = true; throw new SecurityException(ExceptionLocalizerTemplate <SystemExceptionResourceLocalizer, ExceptionId> .GetExceptionMessage(ExceptionId.PermissionIsDenied)); } } }
bool ReloadPermissions() { if (SecuritySystem.Instance is ISecurityComplex) { if (SecuritySystem.CurrentUser != null) { SecuritySystem.ReloadPermissions(); return(true); } } return(false); }
protected override void EditModel() { SecuritySystem.ReloadPermissions(); typeof(DevExpress.ExpressApp.Win.SystemModule.EditModelController).Invoke(this, "UpdateActivity"); if (SecuritySystem.Instance is IRequestSecurity) { SecuritySystem.Demand(new ModelOperationPermissionRequest()); } else { SecuritySystem.Demand(new EditModelPermission(ModelAccessModifier.Allow)); } EditModelCore(); }