From b0389b06b62f6e1aa2efac8867e193705f94a148 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 13 Oct 2010 13:24:33 +0000 Subject: [PATCH] Updated Groupware class -Defintion table is now in an extra class, it is used by several classes right now. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20034 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../personal/groupware/class_Groupware.inc | 38 ++----------------- 1 file changed, 3 insertions(+), 35 deletions(-) diff --git a/gosa-plugins/groupware/personal/groupware/class_Groupware.inc b/gosa-plugins/groupware/personal/groupware/class_Groupware.inc index da8266864..d40449a9b 100644 --- a/gosa-plugins/groupware/personal/groupware/class_Groupware.inc +++ b/gosa-plugins/groupware/personal/groupware/class_Groupware.inc @@ -18,28 +18,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -# Access constants -if(!defined("GROUPWARE_LOOKUP")){ - define ("GROUPWARE_LOOKUP", 1); - define ("GROUPWARE_READ", 2); - define ("GROUPWARE_STATUS", 4); - define ("GROUPWARE_WRITE", 8); - define ("GROUPWARE_INSERT", 16); - define ("GROUPWARE_POST", 32); - define ("GROUPWARE_CREATE", 64); - define ("GROUPWARE_DELETE", 128); - define ("GROUPWARE_ADMINISTRATE", 256); - - - define ("GROUPWARE_RIGHTS_NONE", 0); - define ("RIGHTS_GROUPWARE_READ", GROUPWARE_LOOKUP | GROUPWARE_READ | GROUPWARE_STATUS); - define ("RIGHTS_GROUPWARE_POST", RIGHTS_GROUPWARE_READ | GROUPWARE_POST); - define ("GROUPWARE_RIGHTS_APPEND", RIGHTS_GROUPWARE_POST | GROUPWARE_INSERT); - define ("RIGHTS_GROUPWARE_WRITE", GROUPWARE_RIGHTS_APPEND | GROUPWARE_WRITE | GROUPWARE_CREATE | GROUPWARE_DELETE); - define ("GROUPWARE_RIGHTS_ALL", RIGHTS_GROUPWARE_WRITE | GROUPWARE_ADMINISTRATE); -} - - +# Load Groupware defintion table +new GroupwareDefinitions(); class Groupware extends plugin @@ -246,18 +226,6 @@ class Groupware extends plugin } - function getPermissions() - { - $ret[GROUPWARE_RIGHTS_NONE] = _("None"); - $ret[RIGHTS_GROUPWARE_READ] = _("Read"); - $ret[RIGHTS_GROUPWARE_POST] = _("Post"); - $ret[GROUPWARE_RIGHTS_APPEND] = _("Append"); - $ret[RIGHTS_GROUPWARE_WRITE] = _("Write"); - $ret[GROUPWARE_RIGHTS_ALL] = _("All"); - return($ret); - } - - /*! \brief Generates the HTML user interface for the groupware plugin * and take of several ui actions like adding or removing * forward addresses, filters and the account itself. @@ -336,7 +304,7 @@ class Groupware extends plugin } if(isset($_POST['configureFolder'])){ $this->FolderWidget = new FolderWidget($this->config,$this->mailFolder, $this->folderPrefix); - $this->FolderWidget->setPermissions($this->getPermissions()); + $this->FolderWidget->setPermissions(GroupwareDefinitions::getPermissions()); $this->FolderWidget->acl_base = $this->acl_base; $this->FolderWidget->acl_category = $this->acl_category; } -- 2.30.2