lib/api
Jeroen van Meeuwen
vanmeeuwen at kolabsys.com
Wed Jul 11 14:38:47 CEST 2012
lib/api/kolab_api_service_domain.php | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
New commits:
commit 88b3a3bb3b4e83e54e24fd8acff1d6ecd9afedb2
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date: Wed Jul 11 13:38:27 2012 +0100
Add a domain service method 'select' to allow the selection of the current working domain
diff --git a/lib/api/kolab_api_service_domain.php b/lib/api/kolab_api_service_domain.php
index ad29375..7b7fe21 100644
--- a/lib/api/kolab_api_service_domain.php
+++ b/lib/api/kolab_api_service_domain.php
@@ -71,6 +71,7 @@ class kolab_api_service_domain extends kolab_api_service
$rights['find_by_attribute'] = "r";
$rights['find_by_attributes'] = "r";
$rights['info'] = "r";
+ $rights['select'] = "r";
}
$rights['effective_rights'] = "r";
@@ -184,4 +185,21 @@ class kolab_api_service_domain extends kolab_api_service
return false;
}
+
+ public function domain_select($getdata, $postdata)
+ {
+ if (!isset($getdata['domain'])) {
+ return false;
+ }
+
+ if (empty($_SESSION['user'])) {
+ return false;
+ }
+
+ console("Setting work domain to " . $getdata['domain']);
+
+ $_SESSION['user']->set_domain($getdata['domain']);
+
+ return true;
+ }
}
More information about the commits
mailing list