예제 #1
0
 void ReloadPermissions()
 {
     if (SecuritySystem.Instance is ISecurityComplex)
     {
         if (SecuritySystem.CurrentUser != null && !PermissionsReloaded)
         {
             SecuritySystem.ReloadPermissions();
             PermissionsReloaded = true;
         }
     }
 }
예제 #2
0
 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));
         }
     }
 }
예제 #3
0
 bool ReloadPermissions()
 {
     if (SecuritySystem.Instance is ISecurityComplex)
     {
         if (SecuritySystem.CurrentUser != null)
         {
             SecuritySystem.ReloadPermissions();
             return(true);
         }
     }
     return(false);
 }
예제 #4
0
 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();
 }