Commit a717f3e5 authored by dockx thibault's avatar dockx thibault
Browse files

Merge branch '6307-core-supann-life-cycle-automation-via-orchestrator-3' into 'dev'

Resolve "[CORE] - Supann life cycle - automation via Orchestrator"

See merge request fusiondirectory/fd!1063
Showing with 10 additions and 5 deletions
+10 -5
...@@ -148,7 +148,10 @@ class tasks extends simplePlugin ...@@ -148,7 +148,10 @@ class tasks extends simplePlugin
if (!empty($subTasks)) { if (!empty($subTasks)) {
// Recuperate members DN from the ldap search. // Recuperate members DN from the ldap search.
foreach ($subTasks as $subTask) { foreach ($subTasks as $subTask) {
$membersDN[] = $subTask['fdTasksGranularDN'][0]; // Case of a DN passed but being locked.
if (!empty($subTask['fdTasksGranularDN'][0])) {
$membersDN[] = $subTask['fdTasksGranularDN'][0];
}
} }
// Verify the DN differences and only keep those. // Verify the DN differences and only keep those.
if (!empty($membersDN)) { if (!empty($membersDN)) {
...@@ -198,7 +201,7 @@ class tasks extends simplePlugin ...@@ -198,7 +201,7 @@ class tasks extends simplePlugin
"fdTasksGranularSchedule" => $schedule, "fdTasksGranularSchedule" => $schedule,
]; ];
// Simply merged the common values and the custom ones depending on the attribute type passed. // Simply merged the common values and the custom ones depending on the attribute type passed.
$values['tasksGranular'] = array_merge($prepData['tasksGranular'], $defaultData['tasksGranular']); $values['tasksGranular'] = array_merge($prepData['tasksGranular'], $defaultData['tasksGranular']);
foreach ($values as $tab => $tabvalues) { foreach ($values as $tab => $tabvalues) {
if (!isset($tabObject->by_object[$tab])) { if (!isset($tabObject->by_object[$tab])) {
...@@ -253,10 +256,12 @@ class tasks extends simplePlugin ...@@ -253,10 +256,12 @@ class tasks extends simplePlugin
foreach ($info['member'] as $memberDN) { foreach ($info['member'] as $memberDN) {
$listMemberDN[] = $memberDN; $listMemberDN[] = $memberDN;
} }
// case of member not within a group or dyngroup
// Add the member DN to the list of DN } else {
$listMemberDN = array_unique($listMemberDN); $listMemberDN[] = $group; //Here group is indeed a sole user
} }
// Make sure no duplicate can happens, case of same member in an existing group.
$listMemberDN = array_unique($listMemberDN);
} }
} }
......
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