Пример #1
0
        public ActionResult SaveOperations(FormCollection form, string prefix)
        {
            Lite <RoleEntity> role = this.ExtractLite <RoleEntity>(TypeContextUtilities.Compose(prefix, "Role"));
            TypeEntity        type = this.ExtractEntity <TypeEntity>(TypeContextUtilities.Compose(prefix, "Type"));

            var opers = OperationAuthLogic.GetOperationRules(role, type).ApplyChanges(this, prefix);

            if (opers.HasErrors())
            {
                return(opers.ToJsonModelState());
            }

            OperationAuthLogic.SetOperationRules(opers.Value);

            return(null);
        }
Пример #2
0
 public void SetOperationRules([Required, FromBody] OperationRulePack rules)
 {
     BasicPermission.AdminRules.AssertAuthorized();
     OperationAuthLogic.SetOperationRules(rules);
     Schema.Current.InvalidateMetadata();
 }
Пример #3
0
 public void SetOperationRules(OperationRulePack rules)
 {
     BasicPermission.AdminRules.AssertAuthorized();
     OperationAuthLogic.SetOperationRules(rules);
 }