public IPRestrictionsSettings UpdateIpRestrictionsSettings(bool enable)
        {
            SecurityContext.DemandPermissions(SecutiryConstants.EditPortalSettings);

            var settings = new IPRestrictionsSettings {
                Enable = enable
            };

            settings.Save();

            return(settings);
        }
        public IPRestrictionsSettings UpdateIpRestrictionsSettings(IpRestrictionsModel model)
        {
            SecurityContext.DemandPermissions(Tenant, SecutiryConstants.EditPortalSettings);

            var settings = new IPRestrictionsSettings {
                Enable = model.Enable
            };

            settings.Save();

            return(settings);
        }