Code

Some mini acl fixes
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 23 Nov 2006 10:39:57 +0000 (10:39 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 23 Nov 2006 10:39:57 +0000 (10:39 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5209 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/mimetypes/class_mimetypeManagement.inc

index bca44d97930d02eacebf5d53ac46addd66ba41f7..7b262eccdfbbdb1c83367f52cfd43f6b16d5cbdb 100755 (executable)
@@ -158,7 +158,9 @@ class mimetypeManagement extends plugin
      ****************/
 
     /* New mime type? */
-    if ($s_action=="new"){
+    $ui = get_userinfo();
+    $acl = $ui->get_permissions($this->DivListMimeTypes->selectedBase,"mimetypes/mimetype");
+    if (($s_action=="new") && preg_match("/c/",$acl)){
 
       /* By default we set 'dn' to 'new', all relevant plugins will
          react on this. */
@@ -175,7 +177,7 @@ class mimetypeManagement extends plugin
      ****************/
 
     /* Cancel dialogs */
-    if (isset($_POST['edit_cancel']) || isset($_POST['password_cancel'])){
+    if (isset($_POST['edit_cancel'])){
       del_lock ($this->mimetabs->dn);
       unset ($this->mimetabs);
       $this->mimetabs= NULL;