summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0736455)
raw | patch | inline | side by side (parent: 0736455)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 15 Dec 2006 05:39:16 +0000 (05:39 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 15 Dec 2006 05:39:16 +0000 (05:39 +0000) |
Added Warning dialog - The user is now forced to confirm the save action, if the dn will change.
Sanpshot and ACls entries will be broken after modifying the dn.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5397 594d385d-05f5-0310-b6e9-bd551577e9d8
Sanpshot and ACls entries will be broken after modifying the dn.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5397 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/admin/departments/class_departmentGeneric.inc b/plugins/admin/departments/class_departmentGeneric.inc
index 5c557e3928125e437ab3884dcb81d844a384dfe4..3efe8f8fdb27b8400285e58450d0c8d2f8cb3680 100644 (file)
all POST / GET activity, "Department tagging" and the checkbox within the generic template.
*/
var $UnitTagDiabled = TRUE;
+ var $orig_base = "";
+ var $orig_ou = "";
function department ($config, $dn)
{
$this->ui= get_userinfo();
$this->dn= $dn;
$this->orig_dn= $dn;
+ $this->orig_ou= $this->ou;
$this->config= $config;
/* Set base */
$this->base= preg_replace ("/^[^,]+,/", "", $this->dn);
}
+ $this->orig_base = $this->base;
+
/* Is administrational Unit? */
if ($dn != "new" && in_array_ics('gosaAdministrativeUnit', $this->attrs['objectClass'])){
$this->is_administrational_unit= true;
diff --git a/plugins/admin/departments/class_departmentManagement.inc b/plugins/admin/departments/class_departmentManagement.inc
index 9a82e127f69582b0c0ae51dad11d05128895dffd..a880d81477a9a7e9ce8d29175a5293c5cbe20cc0 100644 (file)
Edit department finished
***************/
- if ((isset($_POST['edit_finish'])) && (isset($this->deptabs->config))){
+ if ((isset($_POST['edit_finish'])) && (isset($this->deptabs->config)) && !isset($_POST['dep_move_confirm'])){
+ $this->deptabs->save_object();
+ $obj = $this->deptabs->by_object['department'];
+ if($obj->orig_dn != "new"){
+ if($obj->orig_ou != $obj->ou || $obj->base != $obj->orig_base){
+ return($smarty->fetch(get_template_path("dep_move_confirm.tpl",TRUE)));
+ }
+ }
+ }
+
+ /* Save changes */
+ if ((isset($_POST['edit_finish'])|| isset($_POST['dep_move_confirm'])) && (isset($this->deptabs->config))){
/* Check tabs, will feed message array */
$message= $this->deptabs->check();
index 81ea9369d5b22434156ce8adffbe0cb182aea5d8..396cf2cf0e977080221e56c807e9290ec5b89232 100644 (file)
<h2>{t}Processing the requested operation{/t}</h2>
{$message}
-{t}As soon as the move operation has finished, you can scroll down to end of the page and press the 'Continue' button to continue with the department management dialog.{/t}
<br>
<br>
<div style="margin:3px;background-color:white; border:1px solid #A0A0A0">
diff --git a/plugins/admin/departments/dep_move_confirm.tpl b/plugins/admin/departments/dep_move_confirm.tpl
--- /dev/null
@@ -0,0 +1,19 @@
+<div style="font-size:18px;">
+ <img alt="" src="images/button_cancel.png" align=top> {t}Warning{/t} - {t}You are currently moving/renaming this department.{/t}
+</div>
+<p>
+{t}Modifying a departments naming attribute 'ou' or base may corrupt acls and snapshot entries for all entire objects.{/t}
+</p>
+<p>
+{t}GOsa can NOT fix this for you, yet.{/t}
+</p>
+<p>
+{t}Before you confirm this action, ensure that everything will be as expected, possibly the best solution is a backup.{/t}
+</p>
+
+<p class="plugbottom">
+ <input type='submit' name='dep_move_confirm' value='{t}Save{/t}'>
+
+ <input type='submit' name='cancel_save' value='{t}Cancel{/t}'>
+</p>
+