public ActionResult SaveProperties(FormCollection form, string prefix) { Lite <RoleEntity> role = this.ExtractLite <RoleEntity>(TypeContextUtilities.Compose(prefix, "Role")); TypeEntity type = this.ExtractEntity <TypeEntity>(TypeContextUtilities.Compose(prefix, "Type")); var prp = PropertyAuthLogic.GetPropertyRules(role, type).ApplyChanges(this, prefix); PropertyAuthLogic.SetPropertyRules(prp.Value); if (prp.HasErrors()) { return(prp.ToJsonModelState()); } return(null); }
public void SetPropertyRule([Required, FromBody] PropertyRulePack rules) { BasicPermission.AdminRules.AssertAuthorized(); PropertyAuthLogic.SetPropertyRules(rules); Schema.Current.InvalidateMetadata(); }
public void SetPropertyRule(PropertyRulePack rules) { BasicPermission.AdminRules.AssertAuthorized(); PropertyAuthLogic.SetPropertyRules(rules); }