From: hickert Date: Wed, 22 Nov 2006 11:42:15 +0000 (+0000) Subject: Hide not allowed actions X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6e3798826383292b48bf2e9a97388f7960e8b1d0;p=gosa.git Hide not allowed actions git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5191 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/mimetypes/class_divListMimeTypes.inc b/plugins/admin/mimetypes/class_divListMimeTypes.inc index d48ad3625..3c3a44073 100755 --- a/plugins/admin/mimetypes/class_divListMimeTypes.inc +++ b/plugins/admin/mimetypes/class_divListMimeTypes.inc @@ -92,8 +92,8 @@ class divListMimeTypes extends MultiSelectWindow array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH); /* Load possible departments */ - $ui= get_userinfo(); - $tdeps= $ui->get_module_departments("fai"); + $ui = get_userinfo(); + $tdeps= $ui->get_module_departments($this->module); $ids = $this->config->idepartments; @@ -109,8 +109,12 @@ class divListMimeTypes extends MultiSelectWindow } } + $ui = get_userinfo(); + $acl = $ui->get_permissions("cn=dummy,ou=mimetypes,".$this->selectedBase,"mimetypes/mimetype"); + $acl_all = $ui->has_complete_category_acls($this->selectedBase,"mimetypes") ; + /* Get copy & paste icon */ - if($this->parent->CopyPasteHandler){ + if(preg_match("/(c.*w|w.*c)/",$acl_all) && $this->parent->CopyPasteHandler){ $Copy_Paste = $this->parent->CopyPasteHandler->generatePasteIcon(); }else{ $Copy_Paste =""; @@ -119,8 +123,6 @@ class divListMimeTypes extends MultiSelectWindow /* Create listhead, it will be shown on top of the divlist. * It provides general navigation and object creation */ - $ui = get_userinfo(); - $acl = $ui->get_permissions("cn=dummy,ou=mimetypes,".$this->selectedBase,"mimetypes/mimetype"); $listhead = "
". "  ". "  "; - $listhead .= $this->get_snapshot_header($this->selectedBase); + + if(preg_match("/(c.*w|w.*c)/",$acl_all)){ + $listhead .= $this->get_snapshot_header($this->selectedBase); + } if(preg_match("/c/",$acl)){ $listhead .= " get_permissions($val['dn'],"mimetypes/mimetype"); + $acl_all = $ui->has_complete_category_acls($val['dn'],"mimetypes") ; + /* Create action icons */ + $actions = ""; + if(preg_match("/(c.*w|w.*c)/",$acl_all)){ + $actions .= $this->GetSnapShotActions($val['dn']); + } /* Get copy Paste icons */ if($this->parent->CopyPasteHandler){