From 9f5220a56b15053d960e8c1f58230b93362c477d Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 23 May 2023 18:33:03 +0100 Subject: [PATCH] Checking admin --- epicyon.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/epicyon.py b/epicyon.py index 532429117..a3e2abadc 100644 --- a/epicyon.py +++ b/epicyon.py @@ -2882,11 +2882,10 @@ def _command_options() -> None: argb.rmaccount = argb.deactivate if argb.rmaccount: + admin_domain = get_config_param(base_dir, 'domain') admin_nickname = get_config_param(base_dir, 'admin') - print('admin_nickname: ' + str(admin_nickname)) - print('argb.rmaccount: ' + str(argb.rmaccount)) - if admin_nickname: - if admin_nickname == argb.rmaccount: + if admin_nickname and admin_domain: + if admin_nickname + '@' + admin_domain == argb.rmaccount: print(argb.rmaccount + ' is the admin account') sys.exit() if '@' in argb.rmaccount: