summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-03-14 19:14:48 +0000
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-03-14 19:15:27 +0000
commit1fc8c1d88a934384b6399741641cf5ab26e7cd80 (patch)
tree88604b36de835b42054fb29e7524510e71518ee8
parent5ddad1bc17829d1871685f90985c46bd5cccb882 (diff)
downloadwebadmin-1fc8c1d88a934384b6399741641cf5ab26e7cd80.tar.gz
Provide (non-functional) version of form_value.generate_uidnumber() and form_value.generate_gidnumber()
-rw-r--r--lib/api/kolab_api_service_form_value.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/api/kolab_api_service_form_value.php b/lib/api/kolab_api_service_form_value.php
index e2baea5..7e80dc6 100644
--- a/lib/api/kolab_api_service_form_value.php
+++ b/lib/api/kolab_api_service_form_value.php
@@ -107,6 +107,17 @@ class kolab_api_service_form_value extends kolab_api_service
}
}
+ private function generate_gidnumber($postdata, $attribs = array())
+ {
+ if (isset($attribs['auto_form_fields']) && isset($attribs['auto_form_fields']['uidnumber'])) {
+ $auth = Auth::get_instance($_SESSION['user']->get_domain());
+
+ // TODO: Take a policy to use a known group ID, a known group (by name?)
+ // and/or create user private groups.
+ return array('gidnumber' => 500);
+ }
+ }
+
private function generate_homedirectory($postdata, $attribs = array())
{
if (isset($attribs['auto_form_fields']) && isset($attribs['auto_form_fields']['homedirectory'])) {
@@ -209,6 +220,17 @@ class kolab_api_service_form_value extends kolab_api_service
}
}
+ private function generate_uidnumber($postdata, $attribs = array())
+ {
+ if (isset($attribs['auto_form_fields']) && isset($attribs['auto_form_fields']['uidnumber'])) {
+ $auth = Auth::get_instance($_SESSION['user']->get_domain());
+
+ // TODO: Actually poll $auth for users with a uidNumber set, and take the next one.
+
+ return array('uidnumber' => 500);
+ }
+ }
+
private function generate_userpassword($postdata, $attribs = array())
{
$password = $this->generate_password($getdata, $postdata, $attribs);