Code

Updated permissions handling
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 8 Oct 2010 12:40:37 +0000 (12:40 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 8 Oct 2010 12:40:37 +0000 (12:40 +0000)
-Do not break acl numbers we do not know.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19956 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index 844b81fe9a377ec8433bf884730f77af50042fc9..56152b86e3d69010641df8da073145d2c618108a 100644 (file)
             <td>{$item.type}</td>
             <td><input type='text' name="permission_{$key}_name" value="{$item.name}"></td>
             <td>
-                <select name="permission_{$key}_acl" size=1>
-                    {html_options options=$permissions selected=$item.acl}
-                </select>
+                {if $permissionCnt == 0 || !isset($permissions[$item.acl])}
+                    <input type='text' name="permission_{$key}_acl" value="{$item.acl}">
+                {else}
+                    <select name="permission_{$key}_acl" size=1>
+                        {html_options options=$permissions selected=$item.acl}
+                    </select>
+                {/if}
             </td>
             <td><button name="permission_{$key}_del">{msgPool type=delButton}</button></td>
         </tr>
index 5042ac3d5a277ab36eb15b159a9b4711269de6a5..4af753839a76199c46fd65403265d10ec86ffe04 100644 (file)
@@ -21,6 +21,7 @@ class FolderEditDialog extends plugin
         $smarty = get_smarty(); 
         $smarty->assign('folderItem', $this->folderItem);
         $smarty->assign('permissions', $this->permissions);
+        $smarty->assign('permissionCnt', count($this->permissions));
         return($smarty->fetch(get_template_path("FolderEditDialog.tpl", TRUE, dirname(__FILE__))));
     }