Commit a98876d9 authored by Côme Chilliet's avatar Côme Chilliet

🚑 fix(gpg) Add cert ID display and fix a few things

issue #6006
parent b7056f2b
......@@ -63,7 +63,7 @@ class pgpKeySelect extends simpleSelectManagement
}
$this->filter->setObjectStorage($this->storagePoints);
$this->filter->category = 'user';
$attributes = ['pgpKeyID', 'pgpUserID', 'pgpKeyCreateTime', 'pgpKeyExpireTime', 'pgpKeyType', 'pgpKeySize'];
$attributes = ['pgpCertID', 'pgpKeyID', 'pgpUserID', 'pgpKeyCreateTime', 'pgpKeyExpireTime', 'pgpKeyType', 'pgpKeySize'];
$this->filter->query[0]['backend'] = 'LDAPBlacklist';
$this->filter->query[0]['filter'] = '$NAME';
$this->filter->query[0]['attribute'] = $attributes;
......@@ -80,7 +80,7 @@ class pgpKeySelect extends simpleSelectManagement
if (($value === FALSE) || ($value === '')) {
return ' ';
}
$return = static::$func($value[0]);
$return = static::$func($value);
return ($return === '' ? ' ' : $return);
}
......@@ -138,6 +138,7 @@ class PgpKeyAttribute extends GenericDialogAttribute
{
parent::__construct($label, $description, $ldapName, $required, $defaultValue, 'dn', NULL, $acl);
$this->displayed_values = [
'pgpCertID' => _('Cert ID'),
'pgpKeyID' => _('Key ID'),
'pgpUserID' => _('User ID'),
'pgpKeyCreateTime' => _('Creation time'),
......
......@@ -21,7 +21,7 @@
</definition>
<table>
<layout>|20px;c|||||||||</layout>
<layout>|20px;c||||||||||</layout>
<department>
<value>%{filter:departmentType(row,dn)}</value>
......@@ -36,6 +36,14 @@
<value>%{filter:objectType(row,dn)}</value>
</column>
<column>
<label>Cert ID</label>
<sortAttribute>pgpCertID</sortAttribute>
<sortType>string</sortType>
<value>%{filter:selectLink(pid,row,dn,pgpCertID)}</value>
<export>true</export>
</column>
<column>
<label>Key ID</label>
<sortAttribute>pgpKeyID</sortAttribute>
......
Markdown is supported
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