Exemplo n.º 1
0
        public ActionResult ManageIPRules([ModelBinder(BinderType = typeof(JsonModelBinder))] IPRule[] rules)
        {
            PermissionContext.VerifyPermission(PermissionToken.ManageIPRules);

            Service.UpdateIPRules(rules);
            _ipRuleManager.Reset(rules.Select(i => i.Address));

            TempData.SetSuccessMessage("IP rules updated.");

            return(View(rules));
        }
Exemplo n.º 2
0
        public ActionResult ManageIPRules([FromJson] IPRule[] rules)
        {
            PermissionContext.VerifyPermission(PermissionToken.ManageIPRules);

            Service.UpdateIPRules(rules);
            ipRuleManager.Reset(rules.Select(i => i.Address));

            TempData.SetSuccessMessage("IP rules updated.");

            return(View(rules));
        }