Web: Client: Settings: fix get ip restriction enable

This commit is contained in:
Viktor Fomin 2022-04-11 17:07:05 +03:00
parent 5dd5e22ba5
commit 44c2a267d4
2 changed files with 6 additions and 5 deletions

View File

@ -41,7 +41,7 @@ const IpSecurity = (props) => {
const {
t,
history,
ipRestrictionEnabled,
ipRestrictionEnable,
setIpRestrictionsEnable,
ipRestrictions,
setIpRestrictions,
@ -62,7 +62,7 @@ const IpSecurity = (props) => {
saveToSessionStorage("defaultIPSettings", defaultSettings);
} else {
const defaultData = {
enable: ipRestrictionEnabled,
enable: ipRestrictionEnable,
ips: ipRestrictions,
};
saveToSessionStorage("defaultIPSettings", defaultData);
@ -72,7 +72,7 @@ const IpSecurity = (props) => {
setEnable(currentSettings.enable);
setIps(currentSettings.ips);
} else {
setEnable(ipRestrictionEnabled);
setEnable(ipRestrictionEnable);
setIps(ipRestrictions);
}
@ -227,14 +227,14 @@ const IpSecurity = (props) => {
export default inject(({ auth }) => {
const {
ipRestrictionEnabled,
ipRestrictionEnable,
setIpRestrictionsEnable,
ipRestrictions,
setIpRestrictions,
} = auth.settingsStore;
return {
ipRestrictionEnabled,
ipRestrictionEnable,
setIpRestrictionsEnable,
ipRestrictions,
setIpRestrictions,

View File

@ -62,6 +62,7 @@ class SettingsSetupStore {
if (authStore.isAuthenticated) {
await authStore.settingsStore.getPortalPasswordSettings();
await authStore.tfaStore.getTfaType();
await authStore.settingsStore.getIpRestrictionsEnable();
await authStore.settingsStore.getIpRestrictions();
}
};