public async Task<ActionResult> SaveGroupPolicyAsync(GroupMenuPolicyInfo model)
        {
            if(!this.ModelState.IsValid)
            {
                return this.InvalidModelState(this.ModelState);
            }

            await GroupMenuPolicyModel.SaveAsync(this.AppUser, model).ConfigureAwait(true);
            return this.Ok("OK");
        }
Beispiel #2
0
        public static async Task SaveAsync(AppUser appUser, GroupMenuPolicyInfo model)
        {
            if (!appUser.IsAdministrator)
            {
                return;
            }

            await
                Menus.SaveGroupPolicyAsync(appUser.Tenant, model.OfficeId, model.RoleId, model.MenuIds)
                    .ConfigureAwait(false);
        }