X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fgroups%2Fclass_divListGroup.inc;h=b46e8ee0826dbf74225b9bd84e0dde0ea7b50b01;hb=9a0dd04fc44c7afa080b0a0dea3db4ce836d8f36;hp=ffac981347ae019156525bc19fb3eef09d900fa3;hpb=47f45f247c547999858874eac073796ce4d6e30b;p=gosa.git
diff --git a/plugins/admin/groups/class_divListGroup.inc b/plugins/admin/groups/class_divListGroup.inc
index ffac98134..b46e8ee08 100644
--- a/plugins/admin/groups/class_divListGroup.inc
+++ b/plugins/admin/groups/class_divListGroup.inc
@@ -79,15 +79,36 @@ class divListGroup extends MultiSelectWindow
which are shown in the listbox on top of the listbox
*/
$options= "";
- foreach ($this->config->idepartments as $key => $value){
- if ($this->selectedBase == $key){
- $options.= "";
- } else {
- $options.= "";
+
+
+
+ /* Get all departments within this subtree */
+ $base = $this->config->current['BASE'];
+ $deps= get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base,
+ array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH);
+
+ /* Load possible departments */
+ $ui= get_userinfo();
+ $tdeps= $ui->get_module_departments("groups");
+
+ $ids = $this->config->idepartments;
+
+ foreach($deps as $dep){
+ if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $tdeps)){
+
+ $value = $ids[$dep['dn']];
+ if ($this->selectedBase == $dep['dn']){
+ $options.= "";
+ } else {
+ $options.= "";
+ }
}
}
- if($this->parent->CopyPasteHandler){
+ $acls = $ui->get_permissions($this->selectedBase,"groups/group");
+
+ /* Get copy & paste icon */
+ if(preg_match("/w/",$acls) && $this->parent->CopyPasteHandler){
$Copy_Paste = $this->parent->CopyPasteHandler->generatePasteIcon();
}else{
$Copy_Paste ="";
@@ -101,9 +122,19 @@ class divListGroup extends MultiSelectWindow
" ".
" ".
" ";
- $listhead .= $this->get_snapshot_header($this->selectedBase);
- $listhead.=" ".
- $Copy_Paste.
+
+ if(preg_match("/c/",$acls) && preg_match("/w/",$acls)){
+ $listhead .= $this->get_snapshot_header($this->selectedBase);
+ }else{
+ $listhead .= " ";
+ }
+
+ if(preg_match("/c/",$acls)) {
+ $listhead.=" ";
+ }
+
+ $listhead.= $Copy_Paste.
" ".
_("Base")." ".
" %s";
+ $ui = get_userinfo();
+
// Test Every Entry and generate divlist Array
foreach($groups as $key => $val){
/* Create action icons - copy & paste icons */
$actions= "";
- if($this->parent->CopyPasteHandler){
+ if(($this->parent->CopyPasteHandler) && preg_match("/w/",$ui->get_category_permissions($val['dn'],"group"))){
$actions.= " ";
$actions.= " ";
}
+
$actions.= "";
- $actions.= $this->GetSnapShotActions($val['dn']);
- $actions.= "";
+
+ if(preg_match("/w/",$ui->get_permissions($val['dn'],"groups/group"))){
+ $actions.= $this->GetSnapShotActions($val['dn']);
+ }
+
+ if(preg_match("/d/",$ui->get_permissions($val['dn'],"groups/group"))){
+ $actions.= "";
+ }
$posix=$mail=$samba=$appl=$phone=$enviro=$empty;