From 91f3bb659e4e5a995f6f27180fa796c4106d545e Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 26 Jul 2006 09:10:14 +0000 Subject: [PATCH] Added acls for webdav and fixed some git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4309 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../connectivity/class_connectivity.inc | 5 ++--- .../connectivity/class_opengwAccount.inc | 4 ++-- .../connectivity/class_oxchangeAccount.inc | 4 ++-- .../connectivity/class_pureftpdAccount.inc | 1 - .../connectivity/class_webdavAccount.inc | 18 +++++++++++++----- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/plugins/personal/connectivity/class_connectivity.inc b/plugins/personal/connectivity/class_connectivity.inc index bd39d628b..534541ecd 100644 --- a/plugins/personal/connectivity/class_connectivity.inc +++ b/plugins/personal/connectivity/class_connectivity.inc @@ -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() )); } } diff --git a/plugins/personal/connectivity/class_opengwAccount.inc b/plugins/personal/connectivity/class_opengwAccount.inc index a4cf38ff3..03da9692e 100644 --- a/plugins/personal/connectivity/class_opengwAccount.inc +++ b/plugins/personal/connectivity/class_opengwAccount.inc @@ -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( diff --git a/plugins/personal/connectivity/class_oxchangeAccount.inc b/plugins/personal/connectivity/class_oxchangeAccount.inc index 6fe55c52f..260a01848 100644 --- a/plugins/personal/connectivity/class_oxchangeAccount.inc +++ b/plugins/personal/connectivity/class_oxchangeAccount.inc @@ -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( diff --git a/plugins/personal/connectivity/class_pureftpdAccount.inc b/plugins/personal/connectivity/class_pureftpdAccount.inc index 09bf7c820..596ab556b 100644 --- a/plugins/personal/connectivity/class_pureftpdAccount.inc +++ b/plugins/personal/connectivity/class_pureftpdAccount.inc @@ -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"; } } diff --git a/plugins/personal/connectivity/class_webdavAccount.inc b/plugins/personal/connectivity/class_webdavAccount.inc index 80860d545..7a96a0ea1 100644 --- a/plugins/personal/connectivity/class_webdavAccount.inc +++ b/plugins/personal/connectivity/class_webdavAccount.inc @@ -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( -- 2.30.2