Code

Some acl fixes for group divlist
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 31 Aug 2006 04:44:24 +0000 (04:44 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 31 Aug 2006 04:44:24 +0000 (04:44 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4548 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/groups/class_divListGroup.inc
plugins/admin/groups/class_groupGeneric.inc

index e3bf0ca57f3d4a32e58751e5dcd0ac4d27ce47b8..55704051becef510faab9104b99ce360869b56c8 100644 (file)
@@ -105,8 +105,10 @@ class divListGroup extends MultiSelectWindow
       }
     }
 
+    $acls  = $ui->get_permissions($this->selectedBase,"groups/group");
+
     /* Get copy & paste icon */
-    if(preg_match("/w/",$ui->get_permissions($this->selectedBase,"groups/group")) &&  $this->parent->CopyPasteHandler){
+    if(preg_match("/w/",$acls) &&  $this->parent->CopyPasteHandler){
       $Copy_Paste = $this->parent->CopyPasteHandler->generatePasteIcon();
     }else{
       $Copy_Paste ="";
@@ -120,9 +122,13 @@ class divListGroup extends MultiSelectWindow
       " <input type='image' class='center' src='images/list_home.png' title='"._("Go to users department")."' alt='"._("Home")."' name='dep_home'>&nbsp;".
       " <input class='center' type='image' src='images/list_reload.png' align='middle' title='"._("Reload list")."' name='submit_department' alt='".        _("Submit")."'>&nbsp;".
       " <img class='center' src='images/list_seperator.png' alt='' height='16' width='1'>&nbsp;";
-    $listhead .= $this->get_snapshot_header($this->selectedBase);
 
-    $acls  = $ui->get_permissions($this->selectedBase,"groups/group");
+    if(preg_match("/c/",$acls) && preg_match("/w/",$acls)){
+      $listhead .= $this->get_snapshot_header($this->selectedBase);
+    }else{
+      $listhead .= "<img class='center' src='images/restore_grey.png' alt=''>&nbsp;";
+    }
+
     if(preg_match("/c/",$acls)) {
       $listhead.=" <input type='image' class='center' src='images/list_new_group.png' 
         title='"._("Create new group")."' alt='"._("New")."' name='group_new'>&nbsp;";
@@ -198,7 +204,10 @@ class divListGroup extends MultiSelectWindow
           src='images/edit.png' alt='"._("edit")."' name='group_edit_%KEY%' title='"._("Edit this entry")."'>";
       }
 
-      $actions.= $this->GetSnapShotActions($val['dn']);
+
+      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.= "<input class='center' type='image'
index 143675cd1f258bafd63c09845c1ef881f5dc9fc4..b884b73adfc9b3bab53ee77101061679823308d5 100644 (file)
@@ -718,7 +718,7 @@ class group extends plugin
       $new_dn= $this->dn;
     }
 
-    if (!$this->acl_is_createable()){
+    if ($this->orig_dn == "new" && !$this->acl_is_createable()){
       $message[]= _("You have no permissions to create a group on this 'Base'.");
     }