Commit 6cbc7e6f authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Fixes: #2034 fixed faiManagement removeRequested method

parent 5e821afa
dev 6104-mail-methods-refactor 6231-give-the-ability-to-the-webservice-to-notice-if-an-attribute-is-monovalued-or-multivalued 6237-add-requiredattrs-array-to-the-webservice-informations 6245-adapt-the-ci-to-the-reorganisation-of-the-dev-tools-and-fixing-the-trigger-downstream-pipelines 6250-supann-configuration-backend-requires-account-life-cycle-section 6280-plugins-update-plugins-to-take-into-consideration-the-new-directory-of-core-structure 6310-tasks-reminder-error-in-the-schema-duplicate-attribute-id 6311-put-the-version-1-5-in-all-yaml-for-fusiondirectory-1-5 6322-template-issue-when-creating-a-template-with-empty-password-error-message-should-not-be-seen-2 6332-zimbra-allows-update-of-data-for-unknown-domain-name-for-specific-individual-aliases 6337-webservice-issue-with-archiving-post-request-not-responding-but-successfully-archiving-user 6341-supann-extract-resources-states-sub-states-from-backend-configuration-to-their-own-objects 6346-lifecycle-adaptation-to-select-supann-resources-and-related-states-via-regex-mechanism master fusiondirectory-1.5 fusiondirectory-1.4 fusiondirectory-1.3.1 fusiondirectory-1.3 fusiondirectory-1.2.3 fusiondirectory-1.2.2 fusiondirectory-1.2.1 fusiondirectory-1.2 fusiondirectory-1.1.1 fusiondirectory-1.1 fusiondirectory-1.0.20 fusiondirectory-1.0.19 fusiondirectory-1.0.18 fusiondirectory-1.0.17 fusiondirectory-1.0.16 fusiondirectory-1.0.15 fusiondirectory-1.0.14 fusiondirectory-1.0.13 fusiondirectory-1.0.12 fusiondirectory-1.0.11 fusiondirectory-1.0.10 fusiondirectory-1.0.9.3 fusiondirectory-1.0.9.2 fusiondirectory-1.0.9.1 fusiondirectory-1.0.9 fusiondirectory-1.0.8.9 fusiondirectory-1.0.8.8 fusiondirectory-1.0.8.7 fusiondirectory-1.0.8.6 fusiondirectory-1.0.8.5 fusiondirectory-1.0.8.4 fusiondirectory-1.0.8.3 fusiondirectory-1.0.8.2 fusiondirectory-1.0.8.1 fusiondirectory-1.0.8 fusiondirectory-1.0.7.5 fusiondirectory-1.0.7.4 fusiondirectory-1.0.7.3 fusiondirectory-1.0.7.2 fusiondirectory-1.0.7.1 fusiondirectory-1.0.7 fusiondirectory-1.0.6 fusiondirectory-1.0.5
No related merge requests found
Showing with 20 additions and 35 deletions
+20 -35
...@@ -291,31 +291,18 @@ class faiManagement extends management ...@@ -291,31 +291,18 @@ class faiManagement extends management
function removeEntryRequested($action="",$target=array(),$all=array(), $altTabClass ="", $altTabType = "", $altAclCategory="") function removeEntryRequested($action="",$target=array(),$all=array(), $altTabClass ="", $altTabType = "", $altAclCategory="")
{ {
$this->closeDialogs(); $this->closeDialogs();
if($action == "remove_multiple"){ // Collect objects to delete
$headpage = $this->getHeadpage();
// Collect objects to delete $to_delete = array();
$headpage = $this->getHeadpage(); foreach ($target as $id) {
$to_delete = array(); $object = $headpage->getEntry($id);
foreach($target as $id){ if (in_array("FAKE_OC_FAI", $object['objectClass'])) {
$object = $headpage->getEntry($id); foreach ($object['GROUPS'] as $entry) {
if(in_array("FAKE_OC_FAI", $object['objectClass'])){ array_push($to_delete, $entry);
foreach($object['GROUPS'] as $entry){
array_push($to_delete, $entry);
}
}
}
return($this->removeFAIObjects($to_delete));
}else{
// Try to remove a single object, only FAI objects can be removed!
$headpage = $this->getHeadpage();
if(count($target) == 1){
$entry = $headpage->getEntry($target[0]);
if($entry && in_array("FAKE_OC_FAI",$entry['objectClass'])){
$this->dialogObject = new faiGroupHandle($entry['GROUPS'],"remove");
} }
} }
} }
return $this->removeFAIObjects($to_delete);
} }
...@@ -348,20 +335,18 @@ class faiManagement extends management ...@@ -348,20 +335,18 @@ class faiManagement extends management
// Check entry locking // Check entry locking
if (count($this->dns)) { if (count($this->dns)) {
if ($user= get_multiple_locks($this->dns)) { if ($user = get_multiple_locks($this->dns)) {
return(gen_locked_message($user,$this->dns)); return gen_locked_message($user,$this->dns);
} }
if (count($this->dns)) { $smarty = get_smarty();
$smarty = get_smarty(); $dns_names = array();
$dns_names = array(); foreach ($this->dns as $dn) {
foreach($this->dns as $dn){ add_lock ($dn, $this->ui->dn);
add_lock ($dn, $this->ui->dn); $dns_names[] = LDAP::fix($dn);
$dns_names[] = LDAP::fix($dn);
}
$smarty->assign("info",msgPool::deleteInfo($dns_names,_("FAI object")));
$smarty->assign("multiple", true);
return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
} }
$smarty->assign("info",msgPool::deleteInfo($dns_names, _("FAI object")));
$smarty->assign("multiple", TRUE);
return $smarty->fetch(get_template_path('remove.tpl', TRUE));
} }
} }
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</td> </td>
<td style='width:150px;'>{$types.$key.NAME}</td> <td style='width:150px;'>{$types.$key.NAME}</td>
<td style='width:80px;'>{if $item.freezed}<i>({t}Freezed{/t})</i>{/if}</td> <td style='width:80px;'>{if $item.freezed}<i>({t}Freezed{/t})</i>{/if}</td>
<td><i>({$item.description.0})</i></td> <td>{if $item.description.0}<i>({$item.description.0})</i>{/if}</td>
</tr> </tr>
{/foreach} {/foreach}
</table> </table>
......
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