From: hickert Date: Tue, 29 Aug 2006 05:16:08 +0000 (+0000) Subject: Some group acl fixes X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=40a2c3b2f1a58cee266f611dd1d86912f7917f5e;p=gosa.git Some group acl fixes git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4528 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/groups/class_groupGeneric.inc b/plugins/admin/groups/class_groupGeneric.inc index 8ca3e3ded..143675cd1 100644 --- a/plugins/admin/groups/class_groupGeneric.inc +++ b/plugins/admin/groups/class_groupGeneric.inc @@ -27,7 +27,6 @@ class group extends plugin var $members= array(); var $users= array(); var $allusers= array(); - var $department= ""; var $saved_gidNumber= ""; var $oldgroupType= ""; var $orig_dn= ""; @@ -302,7 +301,6 @@ class group extends plugin $smarty->assign("bases", $this->config->idepartments); $smarty->assign("base_select", $this->base); - $smarty->assign("department", $this->department); if ($this->samba3){ $domains= array(); @@ -516,9 +514,18 @@ class group extends plugin plugin::save_object(); $this->force_gid= 0; - $this->smbgroup= 0; - foreach (array("force_gid", "department", "base", "smbgroup") as $val) { - if ($this->acl_is_writeable("$val") && isset($_POST["$val"])){ + + + /* Only reset sambagroup flag if we are able to write this flag */ + if($this->acl_is_writeable("sambaGroupType")){ + $this->smbgroup = 0; + } + + foreach (array( + "force_gid" => "gidNumber", + "base" => "base", + "smbgroup" => "sambaGroupType") as $val => $aclname) { + if ($this->acl_is_writeable($aclname) && isset($_POST["$val"])){ $this->$val= $_POST["$val"]; } } @@ -537,7 +544,7 @@ class group extends plugin $this->fon_group= FALSE; } } - if ($this->acl_is_writeable("nagios_group")){ + if ($this->acl_is_writeable("nagios_group")){ if (isset ($_POST['nagios_group'])){ $this->nagios_group= TRUE; } else { diff --git a/plugins/admin/groups/generic.tpl b/plugins/admin/groups/generic.tpl index e01a56167..141bcbf58 100644 --- a/plugins/admin/groups/generic.tpl +++ b/plugins/admin/groups/generic.tpl @@ -6,7 +6,7 @@ {$must} {render acl=$cnACL} - + {/render} @@ -16,8 +16,7 @@ {render acl=$descriptionACL} - + {/render} @@ -32,16 +31,14 @@ {render acl=$baseACL} - {html_options options=$bases selected=$base_select} {/render} -{if $baseSelect} - -{else} -   -{/if} +{render acl=$baseACL disable_picture='images/folder_gray.png'} + +{/render} @@ -54,12 +51,12 @@ {render acl=$gidNumberACL} + {$force_gid} onclick="changeState('gidNumber')"> {/render}   {render acl=$gidNumberACL} - + {/render} @@ -71,7 +68,7 @@ {/render} {render acl=$sambaGroupTypeACL} - {html_options options=$groupTypes selected=$groupType} {/render} @@ -79,7 +76,7 @@   {render acl=$sambaDomainNameACL} - {html_options values=$sambaDomains output=$sambaDomains selected=$sambaDomainName} {/render} @@ -96,7 +93,7 @@ {render acl=$fonGroupACL} - {t}Members are in a phone pickup group{/t} + {t}Members are in a phone pickup group{/t} {/render} @@ -111,7 +108,7 @@ {render acl=$nagiosGroupACL} - {t}Members are in a nagios group{/t} + {t}Members are in a nagios group{/t} {/render} @@ -137,9 +134,9 @@ {/render}
- +   - +