Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
This commit is contained in:
2025-05-01 11:52:43 +07:00
parent ac97396686
commit be74f191c7
2 changed files with 9 additions and 0 deletions

View File

@@ -1,3 +1,6 @@
## 01-05-2025
* Feat: Добавлено разделение по рабочим местам при массовой смене пароля
## 06-03-2025 (Релиз 1.0) ## 06-03-2025 (Релиз 1.0)
* Refactor: Замена Console на AnsiConsole * Refactor: Замена Console на AnsiConsole
* Refactor: Изменена реализация ввода паролей * Refactor: Изменена реализация ввода паролей

View File

@@ -424,6 +424,10 @@ namespace domain_utility
if (remote == "all") if (remote == "all")
{ {
string armListKey = AnsiConsole.Prompt(
new TextPrompt<string>("Введите УЗ на которой нужно сменить пароль")
.AddChoices(new string[] { "OBR", "PIS", "OBM", "MMP" })
);
InputDomainCredentials(); InputDomainCredentials();
string path = Path.Combine(Environment.CurrentDirectory, "settings.json"); string path = Path.Combine(Environment.CurrentDirectory, "settings.json");
if (!File.Exists(path)) if (!File.Exists(path))
@@ -437,6 +441,8 @@ namespace domain_utility
foreach (KeyValuePair<string, List<int>> unit in data.arm_list) foreach (KeyValuePair<string, List<int>> unit in data.arm_list)
{ {
unitKey = unit.Key; unitKey = unit.Key;
if (unitKey != armListKey)
continue;
foreach (int position in unit.Value) foreach (int position in unit.Value)
{ {
remote = CheckComputerName($"{unitKey}{(position < 10 ? $"0{position}" : position.ToString())}"); remote = CheckComputerName($"{unitKey}{(position < 10 ? $"0{position}" : position.ToString())}");