mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-10 05:13:17 +00:00
allow lower sync intervals now
This commit is contained in:
@@ -749,9 +749,7 @@ namespace Bit.Console
|
||||
}
|
||||
}
|
||||
|
||||
Con.Write("Sync interval (minutes, minimum {1}) [{0}]: ", config.IntervalMinutes,
|
||||
SettingsService.Instance.Server.Type == Core.Enums.DirectoryType.Other ||
|
||||
SettingsService.Instance.Server.Type == Core.Enums.DirectoryType.GSuite ? "60" : "5");
|
||||
Con.Write("Sync interval (minutes, minimum {1}) [{0}]: ", config.IntervalMinutes, "5");
|
||||
input = Con.ReadLine();
|
||||
int intervalMinutes;
|
||||
if(!string.IsNullOrEmpty(input) && int.TryParse(input, out intervalMinutes))
|
||||
|
||||
@@ -24,10 +24,8 @@ namespace Bit.Core.Models
|
||||
case DirectoryType.AzureActiveDirectory:
|
||||
break;
|
||||
case DirectoryType.Other:
|
||||
IntervalMinutes = 60;
|
||||
break;
|
||||
case DirectoryType.GSuite:
|
||||
IntervalMinutes = 60;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -76,13 +76,7 @@ namespace Service
|
||||
}
|
||||
|
||||
var intervalMinutes = SettingsService.Instance.Sync.IntervalMinutes;
|
||||
if((SettingsService.Instance.Server.Type == Bit.Core.Enums.DirectoryType.Other ||
|
||||
SettingsService.Instance.Server.Type == Bit.Core.Enums.DirectoryType.GSuite)
|
||||
&& intervalMinutes < 60)
|
||||
{
|
||||
intervalMinutes = 60;
|
||||
}
|
||||
else if(intervalMinutes < 5)
|
||||
if(intervalMinutes < 5)
|
||||
{
|
||||
intervalMinutes = 5;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user