summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorTorsten Grote <grote@kolabsys.com>2012-07-10 09:34:24 +0200
committerTorsten Grote <grote@kolabsys.com>2012-07-10 09:34:24 +0200
commita8a302d4cf03dd8a1af410ecbb51712ed17c42e5 (patch)
treef4af5bdb0c5ac43577b4b0acf905a9392bb6cc53 /doc
parent6c5371d73d00175f350cd9e1b0a6e9f3e05086fe (diff)
downloadwebadmin-a8a302d4cf03dd8a1af410ecbb51712ed17c42e5.tar.gz
added 'professional user' user type
Diffstat (limited to 'doc')
-rw-r--r--doc/sample-insert-hosted-user_types.php107
1 files changed, 99 insertions, 8 deletions
diff --git a/doc/sample-insert-hosted-user_types.php b/doc/sample-insert-hosted-user_types.php
index 8361c5f..823f0c5 100644
--- a/doc/sample-insert-hosted-user_types.php
+++ b/doc/sample-insert-hosted-user_types.php
@@ -14,14 +14,12 @@
$attributes = Array(
/*
- *
* The form fields for which the values can be
* generated automatically, using the existing
* values of form_fields
*/
"auto_form_fields" => Array(
/*
- *
* The 'cn' attribute is required for
* the LDAP objectclasses we use, but
* can be composed from a 'givenname'
@@ -36,7 +34,6 @@
),
),
/*
- *
* The 'mail' attribute is supposed to
* contain the email address this user
* will use for this environment, and
@@ -86,16 +83,107 @@
* for the user.
*/
"mailalternateaddress" => Array(
- "type" => "list",
+ ),
+ "sn" => Array(),
+ "uid" => Array(),
+ "userpassword" => Array(
"optional" => true,
),
- "mailquota" => Array(
+ ),
+ "fields" => Array(
+ "mailquota" => "131072",
+ "nsroledn" => "cn=personal-user,dc=notifytest,dc=tld",
+ "objectclass" => Array(
+ "top",
+ "inetorgperson",
+ "kolabinetorgperson",
+ "mailrecipient",
+ "organizationalperson",
+ "person",
+ ),
+ ),
+ );
+
+ $result = $db->query("INSERT INTO `user_types` (`key`, `name`, `description`, `attributes`) " .
+ "VALUES ('personal','Personal', 'A user with a personal hosted plan'," .
+ "'" . json_encode($attributes) . "')");
+
+ $attributes = Array(
+ /*
+ * The form fields for which the values can be
+ * generated automatically, using the existing
+ * values of form_fields
+ */
+ "auto_form_fields" => Array(
+ /*
+ * The 'cn' attribute is required for
+ * the LDAP objectclasses we use, but
+ * can be composed from a 'givenname'
+ * and 'sn' attribute form_field (of
+ * which 'sn' is also a required
+ * attribute.
+ */
+ "cn" => Array(
+ "data" => Array(
+ "givenname",
+ "sn",
+ ),
+ ),
+ /*
+ * The 'mail' attribute is supposed to
+ * contain the email address this user
+ * will use for this environment, and
+ * is (supposed?) to match the 'uid'
+ * for the user account.
+ *
+ * Disable this auto_form_field if
+ * the API is not capable of making
+ * a 'uid' become a 'uid'@'domain',
+ * where 'domain' is not a valid
+ * LDAP attribute for a user entry.
+ */
+ "mail" => Array(
+ "data" => Array(
+ "uid",
+ ),
+ ),
+ ),
+ "form_fields" => Array(
+ "alias" => Array(
+ "type" => "list",
"optional" => true,
+ "max_count" => 2,
),
- "nsroledn" => Array(
+ "givenname" => Array(),
+ "kolabdelegate" => Array(
"type" => "list",
"autocomplete" => true,
- "optional" => true
+ "optional" => true,
+ ),
+ "kolabinvitationpolicy" => Array(
+ "type" => "select",
+ "values" => Array(
+ "",
+ "ACT_MANUAL",
+ "ACT_REJECT",
+ ),
+ "optional" => true,
+ ),
+ "kolaballowsmtprecipient" => Array(
+ "type" => "list",
+ "optional" => true,
+ ),
+ "kolaballowsmtpsender" => Array(
+ "type" => "list",
+ "optional" => true,
+ ),
+ /*
+ * The 'mailalternateaddress' is supposed
+ * to contain the original email address
+ * for the user.
+ */
+ "mailalternateaddress" => Array(
+ "optional" => true,
),
"sn" => Array(),
"uid" => Array(),
@@ -104,6 +192,8 @@
),
),
"fields" => Array(
+ "mailquota" => "1048576",
+ "nsroledn" => "cn=professional-user,dc=notifytest,dc=tld",
"objectclass" => Array(
"top",
"inetorgperson",
@@ -116,6 +206,7 @@
);
$result = $db->query("INSERT INTO `user_types` (`key`, `name`, `description`, `attributes`) " .
- "VALUES ('personal','Personal', 'A user with a personal hosted plan'," .
+ "VALUES ('professional','Professional', 'A user with a professional hosted plan'," .
"'" . json_encode($attributes) . "')");
+
?>