summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorBogomil Shopov (Kolab Systems) <shopov@kolabsys.com>2011-06-23 09:55:37 (GMT)
committerBogomil Shopov (Kolab Systems) <shopov@kolabsys.com>2011-06-23 09:55:37 (GMT)
commit253dd2c9f6054919036ccc56e07b6ccdb8608608 (patch)
tree47b33969ce6d1c85f69778db09243d5d3a32a32a /www
parente2d63cca238a72c4cbf71bf858939832eef6241c (diff)
downloadkolab-webadmin-253dd2c9f6054919036ccc56e07b6ccdb8608608.tar.gz
Adding ACL checking for ActiveSync. Removing duplicated menu Items. Hiding menu and functionalities depends on ACL.
Changinf package xml with adding file tasks.
Diffstat (limited to 'www')
-rwxr-xr-xwww/admin/user/activesync.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/www/admin/user/activesync.php b/www/admin/user/activesync.php
index 0b211cb..0c51e96 100755
--- a/www/admin/user/activesync.php
+++ b/www/admin/user/activesync.php
@@ -27,12 +27,8 @@ require_once('KolabAdmin/include/authenticate.php');
require_once('KolabAdmin/include/form.class.php');
require_once('KolabAdmin/include/passwd.php');
-//try to include ALL possible configuration files
-@include_once '/kolab/var/kolab/www/z-push/config.php';
-@include_once '/etc/z-push/config.php';
-@include_once '/usr/share/z-push/config.php';
-@include_once '/var/www/z-push/config.php';
-
+//include z-Push config file file
+include_once '@www_dir@/z-push/config.php';
//define errors array
@@ -43,6 +39,14 @@ if((@include_once 'Horde/Kolab/Kolab_Zpush/lib/kolabActivesyncData.php') === fal
$errors[] =_('zPush in not enabled in your system.');
}
+//check for permissions ACL from zpush config file
+if(defined('KOLAB_LDAP_ACL') and KOLAB_LDAP_ACL !=""){
+ $filter = '(member='.$_SESSION['auth_user'].')';
+ $result = $ldap->search( KOLAB_LDAP_ACL, $filter);
+ if (ldap_count_entries($ldap->connection, $result) == 0)
+ $errors[] ="You don't have permissions to manage your activeSync devices.";
+}
+
/*read from her value of the KOLAB_LAXPIC
-1 = allow the user to select (or if the constant doesn't exist)
0 = same as the annotations (no lax mode just jpeg)