Code

Updated divlist icons
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 3 Nov 2006 08:12:46 +0000 (08:12 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 3 Nov 2006 08:12:46 +0000 (08:12 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5003 594d385d-05f5-0310-b6e9-bd551577e9d8

contrib/gosa.conf
include/class_plugin.inc
plugins/admin/users/class_divListUsers.inc

index d182696ee9578e6a19ebda48fedb854f44fced93..f5184648252bba3c84995747028f1ddf3459048e 100644 (file)
                displayerros="{errorlvl}">
 
                <location name="{LOCATIONNAME}"
+                       gidbase="{UIDBASE}"
                        uidbase="{UIDBASE}"
                        governmentmode="{GOVERNMENTMODE}"
                        sambaversion="{SAMBAVERSION}"
index 359b7f848d1c0af887e703dc0906bb510541bfad..af92fbe4f3947467e8386f1f63ffb146e00301d8 100644 (file)
@@ -222,9 +222,7 @@ class plugin
    */
   function execute()
   {
-    $_SESSION['errors'] .= "<div><b>".get_class($this)."</b> - ";
-    $_SESSION['errors'] .= "<font face='courier' color='red' >ACL BASE: ".$this->acl_base."</font>";
-    $_SESSION['errors'] .= "<font face='courier' color='blue'>ACL CAT: ".$this->acl_category."</font></div>";
+    gosa_log("ACL ".get_class($this)." - ".$this->acl_category." - ".$this->acl_base);
 
     /* This one is empty currently. Fabian - please fill in the docu code */
     $_SESSION['current_class_for_help'] = get_class($this);
index e06517ca3db79757747b6a8e70666f23d98e1d64..31d5a5abf36e27335e72290b0346c6110b331835 100644 (file)
@@ -104,7 +104,8 @@ class divListUsers extends MultiSelectWindow
     }
 
     /* Get copy & paste icon */ 
-    if(preg_match("/w/",$ui->get_permissions($this->selectedBase,"users/user")) &&  $this->parent->CopyPasteHandler){
+    $acl = $ui->get_permissions($this->selectedBase,"users/user");
+    if(preg_match("/(c.*w|w.*c)/",$acl) &&  $this->parent->CopyPasteHandler){
       $Copy_Paste = $this->parent->CopyPasteHandler->generatePasteIcon();
     }else{
       $Copy_Paste ="";
@@ -121,19 +122,22 @@ class divListUsers extends MultiSelectWindow
       " <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' align='middle' alt='-' height='16' width='1'>&nbsp;";
-    $listhead .= $this->get_snapshot_header($this->selectedBase);
 
-    $acls  = $ui->get_permissions($this->selectedBase,"users/user");
-    if(preg_match("/c/",$acls)) {
+    
+    if(preg_match("/(c.*w|w.*c)/",$acl)){ 
+      $listhead .= $this->get_snapshot_header($this->selectedBase);
+    }
+
+    if(preg_match("/c/",$acl)) {
       $listhead .= " <input class='center' type='image' align='middle' src='images/list_new_user.png' 
         title='"._("Create new user")."' alt='"._("New user")."' name='user_new'>&nbsp;";
       $listhead .= " <input class='center' type='image' align='middle' src='images/list_new.png' 
         title='"._("Create new template")."' alt='"._("New template")."'        name='user_tplnew'>&nbsp;";
-#      $listhead .=  " <img   class='center' src='images/list_seperator.png' align='middle' alt='-' height='16' width='1'>&nbsp;";
     }
-  
+
+    $listhead .= $Copy_Paste;
+    
     $listhead .=
-      $Copy_Paste.
       _("Base")."&nbsp;<select name='CurrentMainBase' onChange='mainform.submit()' class='center'>$options</select>".
       " <input class='center' type='image' src='images/list_submit.png' align='middle' 
       title='"._("Submit department")."' name='submit_department' alt='".  _("Submit")."'>&nbsp;".
@@ -237,8 +241,10 @@ class divListUsers extends MultiSelectWindow
       /* Create action icons */
       $action= "";
 
-      /* Add copy & cut icons */      
-      if($this->parent->CopyPasteHandler && preg_match("/w/",$ui->get_category_permissions($val['dn'],"users"))) {
+      /* Add copy & cut icons */     
+
+      $acl = $ui->get_permissions($val['dn'],"users/user");
+      if(preg_match("/(c.*w|w.*c)/",$acl) && $this->parent->CopyPasteHandler){
         $action .= "<input class='center' type='image'
           src='images/editcut.png' alt='"._("cut")."' name='cut_%KEY%' title='"._("Cut this entry")."'>&nbsp;";
         $action.= "<input class='center' type='image'
@@ -259,7 +265,9 @@ class divListUsers extends MultiSelectWindow
       }
 
       /* Add snapshot icon */
-      $action.= $this->GetSnapShotActions($val['dn']);
+      if(preg_match("/(c.*w|w.*c)/",$acl)){
+        $action.= $this->GetSnapShotActions($val['dn']);
+      }
 
       /* Add remove icon, if we are allowed to remove the current user */
       if(preg_match("/d/",$ui->get_permissions($val['dn'],"users/user"))) {