fix(client-ui): resolve Medium code-review finding (Client.UI-007)
Remove Password from UserSettings and stop writing it to settings.json; the operator is re-prompted on each launch. Update LoadSettings/SaveSettings comments and adjust the affected test assertion to verify the password is not restored from the persisted model. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -438,7 +438,6 @@ public class MainWindowViewModelTests
|
||||
{
|
||||
EndpointUrl = "opc.tcp://saved:5555",
|
||||
Username = "savedUser",
|
||||
Password = "savedPass",
|
||||
SecurityMode = SecurityMode.Sign,
|
||||
FailoverUrls = "opc.tcp://backup:5555",
|
||||
SessionTimeoutSeconds = 120,
|
||||
@@ -458,7 +457,8 @@ public class MainWindowViewModelTests
|
||||
|
||||
vm.EndpointUrl.ShouldBe("opc.tcp://saved:5555");
|
||||
vm.Username.ShouldBe("savedUser");
|
||||
vm.Password.ShouldBe("savedPass");
|
||||
// Password is intentionally not persisted: re-prompt each launch
|
||||
vm.Password.ShouldBeNull();
|
||||
vm.SelectedSecurityMode.ShouldBe(SecurityMode.Sign);
|
||||
vm.FailoverUrls.ShouldBe("opc.tcp://backup:5555");
|
||||
vm.SessionTimeoutSeconds.ShouldBe(120);
|
||||
|
||||
Reference in New Issue
Block a user