summaryrefslogtreecommitdiffstats
path: root/lib/api/kolab_api_service_type.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-10-03 12:58:26 +0200
committerAleksander Machniak <alec@alec.pl>2012-10-03 12:58:26 +0200
commitf9b4e6bd5d625a5552b40bbb967c09035c9aea7c (patch)
treea16b386f6a3ea45fd5358a8fc6d3e983aa0536b1 /lib/api/kolab_api_service_type.php
parent78ebe8115f764fb80c21d6a4eb1548ecd19f2091 (diff)
downloadwebadmin-f9b4e6bd5d625a5552b40bbb967c09035c9aea7c.tar.gz
Implemented type.effective_rights
Diffstat (limited to 'lib/api/kolab_api_service_type.php')
-rw-r--r--lib/api/kolab_api_service_type.php23
1 files changed, 19 insertions, 4 deletions
diff --git a/lib/api/kolab_api_service_type.php b/lib/api/kolab_api_service_type.php
index 4524556..9255d1c 100644
--- a/lib/api/kolab_api_service_type.php
+++ b/lib/api/kolab_api_service_type.php
@@ -192,10 +192,25 @@ class kolab_api_service_type extends kolab_api_service
public function type_effective_rights($getdata, $postdata)
{
-// $auth = Auth::get_instance();
-// $effective_rights = $auth->list_rights(empty($getdata['user']) ? 'user' : $getdata['user']);
-// return $effective_rights;
- return array();
+ $effective_rights = array();
+ // @TODO: set rights according to user group or sth
+ if ($_SESSION['user']->get_userid() == 'cn=Directory Manager') {
+ $attr_acl = array('read', 'write', 'delete');
+ $effective_rights = array(
+ 'entryLevelRights' => array(
+ 'read', 'add', 'delete', 'write',
+ ),
+ 'attributeLevelRights' => array(
+ 'key' => $attr_acl,
+ 'name' => $attr_acl,
+ 'description' => $attr_acl,
+ 'used_for' => $attr_acl,
+ 'attributes' => $attr_acl,
+ ),
+ );
+ }
+
+ return $effective_rights;
}
/**