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); }
public void SetOperationRules([Required, FromBody] OperationRulePack rules) { BasicPermission.AdminRules.AssertAuthorized(); OperationAuthLogic.SetOperationRules(rules); Schema.Current.InvalidateMetadata(); }
public void SetOperationRules(OperationRulePack rules) { BasicPermission.AdminRules.AssertAuthorized(); OperationAuthLogic.SetOperationRules(rules); }