Verified Commit 70ec1528 authored by dockx thibault's avatar dockx thibault
Browse files

:sparkles: Feat(Integrator) - manage ldap status return.

parent e5449d30
2 merge requests!52:sparkles: Releasing Fusiondirectory Integrator 1.2,!42Resolve "[Integrator] - AUDIT - Removal of audit after set period - new lib"
Pipeline #29325 failed with stages
in 49 seconds
Showing with 5 additions and 7 deletions
+5 -7
...@@ -108,15 +108,12 @@ class AuditLib ...@@ -108,15 +108,12 @@ class AuditLib
if ($interval->days >= $this->auditRetention) { if ($interval->days >= $this->auditRetention) {
// If greater, delete the DN audit entry, we reuse removeSubTask method from gateway and get ldap response.(bool). // If greater, delete the DN audit entry, we reuse removeSubTask method from gateway and get ldap response.(bool).
if ($this->ldapBind->delete($record['dn'])) { $result[$record['dn']] = 'audit entry requiring deletion';
$result[$record['dn']] = 'audit removed'; $result[$record['dn']]['ldapStatus'] = $this->ldapBind->delete($record['dn']);
} else {
$result[$record['dn']] = 'Error during audit deletion';
}
} }
}
}
return $result; return $result;
} }
...@@ -126,7 +123,8 @@ class AuditLib ...@@ -126,7 +123,8 @@ class AuditLib
* @throws Exception * @throws Exception
* Note : Simply take a generalized Ldap time (with UTC = Z) and transform it to php object dateTime. * Note : Simply take a generalized Ldap time (with UTC = Z) and transform it to php object dateTime.
*/ */
public function generalizeLdapTimeToPhpObject ($generalizeLdapDateTime) public
function generalizeLdapTimeToPhpObject ($generalizeLdapDateTime)
{ {
// Extract the date part (first 8 characters: YYYYMMDD), we do not care about hour and seconds. // Extract the date part (first 8 characters: YYYYMMDD), we do not care about hour and seconds.
$auditTimeFormatted = substr($generalizeLdapDateTime, 0, 8); $auditTimeFormatted = substr($generalizeLdapDateTime, 0, 8);
......
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