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-orchestrator
Commits
92fa6a0c
Verified
Commit
92fa6a0c
authored
8 months ago
by
dockx thibault
Browse files
Options
Download
Patches
Plain Diff
Feat(Audit) - first commit
First audit commit logic as plugin
parent
74ab166d
dev
61-orchestrator-lifecycle-array-supann-is-analyzed-with-static-numbering
63-orchestrator-mail-controller-format-of-mail-text-and-signature-are-not-utf8-usage-of-accents-is
70-create-unitests-for-orchestrator
73-orchestrator-create-a-librabry-in-core-orchestrator
78-redesign-audit-class
79-redesign-mail
80-redesign-notifications-class
81-redesign-reminders-class
82-redesign-lifecycle-class
89-orchestrator-lifecycle-adaptation-to-regex-supann-selection
main
revert-55863b23
1.1
2 merge requests
!72
Releasing Fusiondirectory Orchestrator 1.1
,
!56
Resolve "[Orchestrator] - AUDIT - automatic deletion from audit tasks"
Pipeline
#29186
failed with stages
in 1 minute and 58 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugins/tasks/Audit.php
+75
-0
plugins/tasks/Audit.php
with
75 additions
and
0 deletions
+75
-0
plugins/tasks/Audit.php
0 → 100644
+
75
−
0
View file @
92fa6a0c
<?php
class
Audit
implements
EndpointInterface
{
private
TaskGateway
$gateway
;
public
function
__construct
(
TaskGateway
$gateway
)
{
$this
->
gateway
=
$gateway
;
}
/**
* @return array
* Part of the interface of orchestrator plugin to treat GET method
*/
public
function
processEndPointGet
():
array
{
return
[];
}
/**
* @param array|null $data
* @return array
*/
public
function
processEndPointPost
(
array
$data
=
NULL
):
array
{
return
[];
}
/**
* @param array|NULL $data
* @return array
* @throws Exception
*/
public
function
processEndPointPatch
(
array
$data
=
NULL
):
array
{
return
$this
->
processAuditDeletion
(
$this
->
gateway
->
getObjectTypeTask
(
'audit'
));
}
/**
* @param array|NULL $data
* @return array
*/
public
function
processEndPointDelete
(
array
$data
=
NULL
):
array
{
return
[];
}
/**
* @param array $auditSubTasks
* @return array
* @throws Exception
*/
public
function
processAuditDeletion
(
array
$auditSubTasks
):
array
{
$result
=
[];
// todo - Logic to iterate through audit timestamp and delete passed time.
return
$result
;
}
/**
* @param string $mainTaskDn
* @return array
*/
public
function
getAuditMainTask
(
string
$mainTaskDn
):
array
{
// Retrieve data from the main task
return
$this
->
gateway
->
getLdapTasks
(
'(objectClass=fdTasksNotifications)'
,
[
'attr1'
,
'attr2'
,
'attr3'
],
''
,
$mainTaskDn
);
}
}
\ No newline at end of file
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