Code

Added ACL handling
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 8 Oct 2010 12:36:38 +0000 (12:36 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 8 Oct 2010 12:36:38 +0000 (12:36 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19955 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/groupware/personal/groupware/FolderWidget/FolderEditDialog.tpl
gosa-plugins/groupware/personal/groupware/FolderWidget/FolderWidget-list.xml
gosa-plugins/groupware/personal/groupware/FolderWidget/class_FolderEditDialog.inc
gosa-plugins/groupware/personal/groupware/FolderWidget/class_FolderWidget.inc

index 1a4c5099180ef6c342da4e825c7ee2446aa31053..844b81fe9a377ec8433bf884730f77af50042fc9 100644 (file)
         <tr>
             <td>{$item.type}</td>
             <td><input type='text' name="permission_{$key}_name" value="{$item.name}"></td>
-            <td><input type='text' name="permission_{$key}_acl" value="{$item.acl}"></td>
+            <td>
+                <select name="permission_{$key}_acl" size=1>
+                    {html_options options=$permissions selected=$item.acl}
+                </select>
+            </td>
             <td><button name="permission_{$key}_del">{msgPool type=delButton}</button></td>
         </tr>
     {/foreach}
index 10d9e60781945f61713c089f9043f99acc75ed2d..9187502da9f5860c530a04102c809485fdc69074 100644 (file)
      <action>
       <name>new</name>
       <type>entry</type>
-      <image>plugins/sudo/images/select_sudo.png[new]</image>
-      <label>Role</label>
-     </action>
-
-     <action>
-      <name>new_default</name>
-      <type>entry</type>
-      <image>plugins/sudo/images/select_sudo.png</image>
-      <label>Default</label>
+      <image>images/lists/folder.png</image>
+      <label>Sub folder</label>
      </action>
 
     </action>
index 0f5f6d9fe0a20f86f186a2247e9b0e67c45ee6c0..5042ac3d5a277ab36eb15b159a9b4711269de6a5 100644 (file)
@@ -3,6 +3,7 @@
 class FolderEditDialog extends plugin
 {
     private $folderItem = NULL;    
+    private $permissions = array();
 
     function __construct($config, $folderItem)
     {
@@ -10,10 +11,16 @@ class FolderEditDialog extends plugin
         $this->folderItem = $folderItem;
     }
 
+    function setPermissions($perms)
+    {
+        $this->permissions = $perms;
+    }
+
     function execute()
     {
         $smarty = get_smarty(); 
         $smarty->assign('folderItem', $this->folderItem);
+        $smarty->assign('permissions', $this->permissions);
         return($smarty->fetch(get_template_path("FolderEditDialog.tpl", TRUE, dirname(__FILE__))));
     }
 
index 6bba3f0eba616d2936e7fc54e2c042c45abf2242..d40dcd49ac4b2aed04a8a5b700a543fa4bfb2892 100644 (file)
@@ -13,6 +13,7 @@ class FolderWidget extends plugin
     private $folderList;
 
     private $baseEntryMap = array();
+    private $permissions = array();
 
     function __construct(&$config, $folderList, $accountPrefix)
     {
@@ -33,6 +34,11 @@ class FolderWidget extends plugin
         $this->FolderWidgetListing->setFolderRoot($this->rootBase);
     }
 
+    function setPermissions($perms)
+    {
+        $this->permissions = $perms;
+    }
+
     function pathToDn($path)
     {
         $dn ="";
@@ -143,6 +149,7 @@ class FolderWidget extends plugin
         if($item){
             $this->currentlyEditedItem = $item;
             $this->dialog = new FolderEditDialog($this->config, $item);
+            $this->dialog->setPermissions($this->permissions);
         }
     }