Commit 0dc8be86 authored by Côme Chilliet's avatar Côme Chilliet

Merge branch...

Merge branch '6027-impossible-to-use-createtimestamp-as-a-column-in-manager-interface' into '1.4-dev'

Resolve "Impossible to use createTimestamp as a column in manager interface"

See merge request fusiondirectory/fd!675
parents 270bb98a c42552e9
......@@ -2071,16 +2071,17 @@ class simplePlugin implements SimpleTab
/*! \brief This function generate the needed ACLs for a given attribtues array
*
* \param array $attributesInfo the attribute array
*
* \param bool? $operationalAttributes Whether to add ACLs for operational attributes. Use NULL for autodetection (default)
*/
static function generatePlProvidedAcls (array $attributesInfo): array
static function generatePlProvidedAcls (array $attributesInfo, bool $operationalAttributes = NULL): array
{
$plProvidedAcls = [];
foreach ($attributesInfo as $sectionInfo) {
foreach ($sectionInfo['attrs'] as $attr) {
if ($attr->getLdapName() === 'base') {
if (($attr->getLdapName() === 'base') && ($operationalAttributes === NULL)) {
/* If we handle base, we also handle LDAP operational attributes */
$plProvidedAcls['createTimestamp'] = _('The time the entry was added');
$plProvidedAcls['modifyTimestamp'] = _('The time the entry was last modified');
$operationalAttributes = TRUE;
}
$aclInfo = $attr->getAclInfo();
if ($aclInfo !== FALSE) {
......@@ -2088,6 +2089,10 @@ class simplePlugin implements SimpleTab
}
}
}
if ($operationalAttributes) {
$plProvidedAcls['createTimestamp'] = _('The time the entry was added');
$plProvidedAcls['modifyTimestamp'] = _('The time the entry was last modified');
}
return $plProvidedAcls;
}
......
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