public ActionResult SavePolicy(int officeId, int userId, List <AccessPolicyInfo> model) { if (!ModelState.IsValid) { return(this.InvalidModelState()); } EntityAccessPolicyModel.Save(officeId, userId, model); return(this.Ok()); }
public async Task <ActionResult> SavePolicyAsync(int officeId, int userId, List <AccessPolicyInfo> model) { if (!this.ModelState.IsValid) { return(this.InvalidModelState(this.ModelState)); } await EntityAccessPolicyModel.SaveAsync(this.AppUser, officeId, userId, model).ConfigureAwait(true); return(this.Ok()); }
public async Task <ActionResult> GetPolicyAsync(int officeId, int userId) { var model = await EntityAccessPolicyModel.GetAsync(this.AppUser, officeId, userId).ConfigureAwait(true); return(this.Ok(model)); }
public async Task <ActionResult> UserPolicyAsync() { var model = await EntityAccessPolicyModel.GetAsync(this.AppUser).ConfigureAwait(true); return(this.FrapidView(this.GetRazorView <AreaRegistration>("AccessPolicy/Policy.cshtml", this.Tenant), model)); }
public ActionResult GetPolicy(int officeId, int userId) { var model = EntityAccessPolicyModel.Get(officeId, userId); return(this.Ok(model)); }
public ActionResult UserPolicy() { var model = EntityAccessPolicyModel.Get(); return(this.FrapidView(this.GetRazorView <AreaRegistration>("AccessPolicy/Policy.cshtml"), model)); }