Verified Commit 1cb05108 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(gpg) Avoid showing GPG configuration warning too early

issue #6022
Showing with 6 additions and 2 deletions
+6 -2
...@@ -60,6 +60,11 @@ class pgpKeySelect extends selectManagement ...@@ -60,6 +60,11 @@ class pgpKeySelect extends selectManagement
{ {
/* Set baseMode to FALSE */ /* Set baseMode to FALSE */
$this->listing = new managementListing($this, FALSE, $this->multiSelect); $this->listing = new managementListing($this, FALSE, $this->multiSelect);
$infos = objects::infos($this->objectTypes[0]);
if ($infos['ou'] == 'unknown') {
msg_dialog::display(_('Configuration error'), _('You need to configure GPG base dn through the addons section first'));
}
} }
public static function getPgpKeysOu (): string public static function getPgpKeysOu (): string
...@@ -74,8 +79,7 @@ class pgpKeySelect extends selectManagement ...@@ -74,8 +79,7 @@ class pgpKeySelect extends selectManagement
$pgpServerInfo['pgpBaseKeySpaceDN'][0] $pgpServerInfo['pgpBaseKeySpaceDN'][0]
); );
} else { } else {
msg_dialog::display(_('Configuration error'), _('You need to configure GPG base dn through the addons section first')); return 'unknown';
return '';
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment