Commit 8cb6140d authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Fixes #4981 trying to put an ACL assignments on an non existing branch crashes

Showing with 13 additions and 4 deletions
+13 -4
...@@ -104,8 +104,12 @@ class aclAssignmentCreationDialog extends simplePlugin ...@@ -104,8 +104,12 @@ class aclAssignmentCreationDialog extends simplePlugin
msg_dialog::displayChecks($msgs); msg_dialog::displayChecks($msgs);
return TRUE; return TRUE;
} }
$this->simpleManagement->closeDialogs(); try {
$this->simpleManagement->newEntryConfirmed($this->baseDn); $this->simpleManagement->newEntryConfirmed($this->baseDn);
} catch (NonExistingLdapNodeException $e) {
msg_dialog::displayChecks(array(_('The dn you entered could not be found in the LDAP')));
return TRUE;
}
return FALSE; return FALSE;
} }
...@@ -179,14 +183,19 @@ class aclManagement extends simpleManagement ...@@ -179,14 +183,19 @@ class aclManagement extends simpleManagement
{ {
$type = 'aclAssignment'; $type = 'aclAssignment';
/* This might throw an exception which is catched in aclAssignmentCreationDialog */
$tabObject = objects::open($this->dn, $type);
/* This will happen only if the exception is not thrown */
$this->closeDialogs();
$this->displayApplyBtn = FALSE; $this->displayApplyBtn = FALSE;
$this->dn = $dn; $this->dn = $dn;
$this->is_single_edit = FALSE; $this->is_single_edit = FALSE;
set_object_info($this->dn); set_object_info($this->dn);
// Open object $this->openTabObject($tabObject, $this->headpage->getBase());
$this->openTabObject(objects::open($this->dn, $type), $this->headpage->getBase());
@DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $this->dn, 'Creating new ACL assignment'); @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $this->dn, 'Creating new ACL assignment');
} }
......
  • bmortier @bmortier

    mentioned in issue #1580

    By bmortier on 2017-09-02T15:31:22 (imported from GitLab)

    ·

    mentioned in issue #1580

    By bmortier on 2017-09-02T15:31:22 (imported from GitLab)

    Toggle commit list
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