Code

Added acls to ldap import csv
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 31 Oct 2006 11:10:20 +0000 (11:10 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 31 Oct 2006 11:10:20 +0000 (11:10 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4974 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/addons/ldapmanager/class_csvimport.inc

index c1bc331e49fd3be14aa7585d76d89baeab7ac66a..be1b15120fb328bffb00972f422fc35dd3ac9516 100644 (file)
@@ -18,6 +18,8 @@ class csvimport extends plugin
   {
     /* Include config object */
     $this->config= $config;
+
+    $this->ui = get_userinfo();
   }
 
   function execute()
@@ -90,8 +92,11 @@ class csvimport extends plugin
     $smarty->assign("attrs",$this->csvinfo['attr']);
 
     /* Check permissions for import */
-    if (chkacl($this->acl,"csvimport")!=""){
-      print_red(_("You've no permission to do CSV imports."));
+    $acl = $this->ui->get_permissions($this->config->current['BASE'],"all/all");
+    if(!preg_match("/w/",$acl)){
+      if(isset($_POST['userfile']) || isset($_POST['sorted']) || isset($_POST['fileup'])){
+        print_red(_("You've no permission to do CSV imports."));
+      }
       return ($smarty->fetch (get_template_path('contentcsv.tpl', TRUE)));
     }