Code

Added acls for webdav and fixed some
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 26 Jul 2006 09:10:14 +0000 (09:10 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 26 Jul 2006 09:10:14 +0000 (09:10 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4309 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/connectivity/class_connectivity.inc
plugins/personal/connectivity/class_opengwAccount.inc
plugins/personal/connectivity/class_oxchangeAccount.inc
plugins/personal/connectivity/class_pureftpdAccount.inc
plugins/personal/connectivity/class_webdavAccount.inc

index bd39d628bb64a357af4b3dc8d444206c19e1e97a..534541ecd2c4388fb0253c204fe0043b26482479 100644 (file)
@@ -164,7 +164,7 @@ class connectivity extends plugin
     }
   }
 
-  /* Return plugin informations for acl handling 
+/* Return plugin informations for acl handling 
 #FIXME We should check here, if the user has access to one of the subClasses */ 
   function plInfo()
   {
@@ -177,8 +177,7 @@ class connectivity extends plugin
           "plSection"       => "personal",                        // This belongs to personal
           "plCategory"      => array("users"),
           "plOptions"       => array(),
-          "plProvidedAcls"  => array(
-            "connectivity"      => "!!! FIXME "._("Connectivity  account"))
+          "plProvidedAcls"  => array()
           ));
   }
 }
index a4cf38ff3c3cf0f61da26fc7450335dbbc26a893..03da9692e03bc41f688d43a4ae6efea2beff73e7 100644 (file)
@@ -336,10 +336,10 @@ class opengwAccount extends plugin
           "plShortName"     => _("Opengroupware"),
           "plDescription"   => _("Open groupware account settings"),
           "plSelfModify"    => TRUE,
-          "plDepends"       => array("connectivity"),
+          "plDepends"       => array("user"),
           "plPriority"      => 3,                                 // Position in tabs
           "plSection"       => "personal",                        // This belongs to personal
-          "plCategory"      => array("gosaAccount"),
+          "plCategory"      => array("users"),
           "plOptions"       => array(),
 
           "plProvidedAcls"  => array(
index 6fe55c52f6ec5724f7b1fab21c96bf4febcde28d..260a0184881650726ab37afce66de47533b4c40d 100644 (file)
@@ -881,10 +881,10 @@ class oxchangeAccount extends plugin
           "plShortName"     => _("Open xchange"),
           "plDescription"   => _("Open xchange account settings"),
           "plSelfModify"    => TRUE,
-          "plDepends"       => array("connectivity"),
+          "plDepends"       => array("user"),
           "plPriority"      => 4,                                 // Position in tabs
           "plSection"       => "personal",                        // This belongs to personal
-          "plCategory"      => array("gosaAccount"),
+          "plCategory"      => array("users"),
           "plOptions"       => array(),
 
           "plProvidedAcls"  => array(
index 09bf7c8208b0fc249d4b8d6540d7deb5adc00641..596ab556bf5138d9343200ab65daac59c7c4a3e9 100644 (file)
@@ -48,7 +48,6 @@ class pureftpdAccount extends plugin
       $smarty->assign($key."_W", $this->acl_is_writeable($key));
   
       if($this->acl_is_writeable($key)){
-        echo "JOP";
         $changeState.= " changeState('".$key."'); \n";
       }
     }
index 80860d545ab2753a6d6099a4bbc2ab29789a43b4..7a96a0ea161ca9baa4f2bf851ca9952e4f67600b 100644 (file)
@@ -37,7 +37,11 @@ class webdavAccount extends plugin
       $smarty->assign("tabbed", 1);
     }
 
-    $smarty->assign('webdavAccountACL', chkacl($this->acl, 'webdavAccount'));
+    if(($this->is_account && $this->acl_is_removeable()) || (!$this->is_account && $this->acl_is_createable())) {
+      $smarty->assign('webdavAccountACL', "");
+    }else{
+      $smarty->assign('webdavAccountACL', " disabled ");
+    }
 
     $display.= $smarty->fetch (get_template_path('webdav.tpl', TRUE, dirname(__FILE__)));
     return ($display);
@@ -75,10 +79,14 @@ class webdavAccount extends plugin
     if (isset($_POST['connectivityTab'])){
       if (isset($_POST['webdav'])){
         if (!$this->is_account && $_POST['webdav'] == "B"){
-          $this->is_account= TRUE;
+          if($this->acl_is_createable()){
+            $this->is_account= TRUE;
+          }
         }
       } else {
-        $this->is_account= FALSE;
+        if($this->acl_is_removeable()){
+          $this->is_account= FALSE;
+        }
       }
     }
 
@@ -124,10 +132,10 @@ class webdavAccount extends plugin
           "plShortName"     => _("WebDAV"),
           "plDescription"   => _("WebDAV account"),
           "plSelfModify"    => TRUE,
-          "plDepends"       => array("connectivity"),
+          "plDepends"       => array("user"),
           "plPriority"      => 9,                                 // Position in tabs
           "plSection"       => "personal",                        // This belongs to personal
-          "plCategory"      => array("gosaAccount"),
+          "plCategory"      => array("users"),
           "plOptions"       => array(),
 
           "plProvidedAcls"  => array(