chore: remove login method setting
This commit is contained in:
@@ -8,7 +8,7 @@ test('plugin metadata and packaging docs match project rules', function (): void
|
||||
assert_contains('name=MX-Autologin', $conf);
|
||||
assert_contains('id=mxautologin', $conf);
|
||||
assert_contains('type=user', $conf);
|
||||
assert_contains('version=1.1.3', $conf);
|
||||
assert_contains('version=1.1.4', $conf);
|
||||
assert_contains('user_run_as=root', $conf);
|
||||
assert_contains('/Users/marek/GPT/ChatGPT/da_plugins/mail-login/src', $packing);
|
||||
assert_contains('/Users/marek/GPT/ChatGPT/da_plugins/mail-login/archives/X.Y.Z/mxautologin.tar.gz', $packing);
|
||||
@@ -86,6 +86,7 @@ test('plugin icon follows directadmin login screen palette', function (): void {
|
||||
assert_contains('#2ec4b6', $icon);
|
||||
assert_contains('#2f95c8', $icon);
|
||||
assert_contains('#ff8a00', $icon);
|
||||
assert_contains('fill="#ff8a00"', $icon);
|
||||
assert_contains('#ffffff', $icon);
|
||||
assert_not_contains('#14532d', $icon);
|
||||
});
|
||||
|
||||
@@ -11,7 +11,6 @@ test('settings expose secure defaults from plugin-settings.conf', function (): v
|
||||
assert_true($settings->ipMask());
|
||||
assert_same('MASKED', $settings->auditClientIp('198.51.100.10'));
|
||||
assert_true($settings->defaultEnable());
|
||||
assert_same('login_url', $settings->method());
|
||||
assert_same('root', $settings->sshUser());
|
||||
assert_same('https://mx1.mojserwer.pl:2222', $settings->targetBaseUrl());
|
||||
});
|
||||
@@ -77,14 +76,15 @@ test('settings do not expose mx helper mode', function (): void {
|
||||
assert_not_contains('MX_LOGIN_MODE', $config);
|
||||
});
|
||||
|
||||
test('settings reject disabled plugin and unsupported methods through access guard', function (): void {
|
||||
try {
|
||||
Settings::fromArray(['MAIL_LOGIN_METHOD' => 'password']);
|
||||
throw new RuntimeException('Expected unsupported method to fail');
|
||||
} catch (InvalidArgumentException $e) {
|
||||
assert_contains('MAIL_LOGIN_METHOD', $e->getMessage());
|
||||
}
|
||||
test('settings do not expose deprecated mail login method switch', function (): void {
|
||||
$defaults = Settings::defaults();
|
||||
$config = file_get_contents(PLUGIN_ROOT . '/plugin-settings.conf') ?: '';
|
||||
|
||||
assert_false(array_key_exists('MAIL_LOGIN_METHOD', $defaults));
|
||||
assert_not_contains('MAIL_LOGIN_METHOD', $config);
|
||||
});
|
||||
|
||||
test('settings expose disabled plugin flag through access guard', function (): void {
|
||||
$settings = Settings::fromArray(['DEFAULT_ENABLE' => 'false']);
|
||||
assert_false($settings->defaultEnable());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user