From 25a1520b8e52a5504861fa7c3598f001b53817b4 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 31 Oct 2006 11:10:20 +0000 Subject: [PATCH] Added acls to ldap import csv git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4974 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/addons/ldapmanager/class_csvimport.inc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/addons/ldapmanager/class_csvimport.inc b/plugins/addons/ldapmanager/class_csvimport.inc index c1bc331e4..be1b15120 100644 --- a/plugins/addons/ldapmanager/class_csvimport.inc +++ b/plugins/addons/ldapmanager/class_csvimport.inc @@ -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))); } -- 2.30.2