Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
fusiondirectory
fusiondirectory-integrator
Commits
70ec1528
Verified
Commit
70ec1528
authored
8 months ago
by
dockx thibault
Browse files
Options
Download
Patches
Plain Diff
Feat(Integrator) - manage ldap status return.
parent
e5449d30
dev
main
1.2
2 merge requests
!52
:sparkles: Releasing Fusiondirectory Integrator 1.2
,
!42
Resolve "[Integrator] - AUDIT - Removal of audit after set period - new lib"
Pipeline
#29325
failed with stages
in 49 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/FusionDirectory/Audit/AuditLib.php
+5
-7
src/FusionDirectory/Audit/AuditLib.php
with
5 additions
and
7 deletions
+5
-7
src/FusionDirectory/Audit/AuditLib.php
+
5
−
7
View file @
70ec1528
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets