From 388d876a0b2e96c699fb523a5082e2c0f4499251 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 28 Jun 2011 09:17:58 +0000 Subject: [PATCH] Added ability to edit uid proposals for users created from a template git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20921 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_core.inc | 10 +++++++++ .../admin/users/class_userManagement.inc | 4 ++++ gosa-core/plugins/admin/users/template.tpl | 21 ++++++++++++++----- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/gosa-core/include/class_core.inc b/gosa-core/include/class_core.inc index 834ed53f6..29ddf149f 100644 --- a/gosa-core/include/class_core.inc +++ b/gosa-core/include/class_core.inc @@ -495,6 +495,16 @@ class core extends plugin { "group" => "core", "mandatory" => FALSE), + array( + "name" => "allowModificationOfUid", + "type" => "bool", + "default" => "false", + "description" => _("Allows to modify uid-proposals when creating a new user from a user-template."), + "check" => "gosaProperty::isBool", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + array( "name" => "modificationDetectionAttribute", "type" => "switch", diff --git a/gosa-core/plugins/admin/users/class_userManagement.inc b/gosa-core/plugins/admin/users/class_userManagement.inc index f554cf372..a16e1e202 100644 --- a/gosa-core/plugins/admin/users/class_userManagement.inc +++ b/gosa-core/plugins/admin/users/class_userManagement.inc @@ -481,6 +481,7 @@ class userManagement extends management $smarty->assign("template", array_pop($target)); $smarty->assign("templates", $templates); $smarty->assign("edit_uid", ""); + $smarty->assign("allowModificationOfUid", $this->config->get_cfg_value("core","allowModificationOfUid")); return($smarty->fetch(get_template_path('template.tpl', TRUE))); // -> See 'templateContinue' for further handling! @@ -517,6 +518,7 @@ class userManagement extends management $smarty->assign("template", "none"); $smarty->assign("templates", $templates); $smarty->assign("edit_uid", ""); + $smarty->assign("allowModificationOfUid", $this->config->get_cfg_value("core","allowModificationOfUid")); return($smarty->fetch(get_template_path('template.tpl', TRUE))); // -> See 'templateContinue' for further handling! @@ -570,6 +572,7 @@ class userManagement extends management $smarty->assign("templates",$templates); $smarty->assign("got_uid", $this->got_uid); $smarty->assign("edit_uid",false); + $smarty->assign("allowModificationOfUid", $this->config->get_cfg_value("core","allowModificationOfUid")); return($smarty->fetch(get_template_path('template.tpl', TRUE))); } @@ -625,6 +628,7 @@ class userManagement extends management $smarty->assign("template", get_post('template')); } $smarty->assign("templates",$templates); + $smarty->assign("allowModificationOfUid", $this->config->get_cfg_value("core","allowModificationOfUid")); return($smarty->fetch(get_template_path('template.tpl', TRUE))); } diff --git a/gosa-core/plugins/admin/users/template.tpl b/gosa-core/plugins/admin/users/template.tpl index ce9fee395..a1b443928 100644 --- a/gosa-core/plugins/admin/users/template.tpl +++ b/gosa-core/plugins/admin/users/template.tpl @@ -32,11 +32,22 @@ {t}Login{/t} {if $edit_uid eq "false"} - - {else} - + {if $allowModificationOfUid == "true"} + + + + {else} + + {/if} + {else} + {/if} -- 2.30.2