summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2014-08-26 09:09:40 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2014-08-26 09:09:40 (GMT)
commita21a3ede4bfc20c2b1d14d5aa6656df1c3fd46aa (patch)
treeea8bfab5c6da0de02df88e0775a6a2faad453f4d /doc
parent7fd434797e24e256bfec7645048767ef9c4d3afe (diff)
downloadkolab-wap-a21a3ede4bfc20c2b1d14d5aa6656df1c3fd46aa.tar.gz
Make possible to define default object type (#2587)
Diffstat (limited to 'doc')
-rw-r--r--doc/kolab_wap.sql18
-rw-r--r--doc/sample-insert-user_types.php6
2 files changed, 15 insertions, 9 deletions
diff --git a/doc/kolab_wap.sql b/doc/kolab_wap.sql
index d8e7c72..18a4b03 100644
--- a/doc/kolab_wap.sql
+++ b/doc/kolab_wap.sql
@@ -28,6 +28,7 @@ CREATE TABLE `group_types` (
`name` varchar(256) NOT NULL,
`description` text NOT NULL,
`attributes` longtext NOT NULL,
+ `is_default` tinyint(1) DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
@@ -39,7 +40,7 @@ CREATE TABLE `group_types` (
LOCK TABLES `group_types` WRITE;
/*!40000 ALTER TABLE `group_types` DISABLE KEYS */;
-INSERT INTO `group_types` VALUES (1,'kolab','Kolab Distribution Group (Static)','A static Kolab Distribution Group (with mail address)','{\"auto_form_fields\":{\"mail\":{\"data\":[\"cn\"]}},\"fields\":{\"objectclass\":[\"top\",\"groupofuniquenames\",\"kolabgroupofuniquenames\"]},\"form_fields\":{\"cn\":[],\"kolaballowsmtprecipient\":{\"type\":\"list\",\"optional\":true},\"kolaballowsmtpsender\":{\"type\":\"list\",\"optional\":true},\"ou\":{\"type\":\"select\"},\"uniquemember\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true}}}'),(2,'kolab_dynamic','Kolab Distribution Group (Dynamic)','A dynamic Kolab Distribution Group (with mail address)','{\"auto_form_fields\":{\"mail\":{\"data\":[\"cn\"]}},\"fields\":{\"objectclass\":[\"top\",\"groupofurls\",\"kolabgroupofuniquenames\"]},\"form_fields\":{\"cn\":[],\"kolaballowsmtprecipient\":{\"type\":\"list\",\"optional\":true},\"kolaballowsmtpsender\":{\"type\":\"list\",\"optional\":true},\"memberurl\":{\"type\":\"ldap_url\",\"optional\":true},\"ou\":{\"type\":\"select\"},\"uniquemember\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true}}}'),(3,'posix','(Pure) POSIX Group','A pure UNIX POSIX Group','{\"auto_form_fields\":{\"gidnumber\":[]},\"fields\":{\"objectclass\":[\"top\",\"groupofuniquenames\",\"posixgroup\"]},\"form_fields\":{\"cn\":[],\"ou\":{\"type\":\"select\"},\"uniquemember\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true}}}'),(4,'posix_mail','Mail-enabled POSIX Group','A Kolab and also UNIX POSIX Group','{\"auto_form_fields\":{\"gidnumber\":[],\"mail\":{\"data\":[\"cn\"]}},\"fields\":{\"objectclass\":[\"top\",\"groupofuniquenames\",\"kolabgroupofuniquenames\",\"posixgroup\"]},\"form_fields\":{\"cn\":[],\"kolaballowsmtprecipient\":{\"type\":\"list\",\"optional\":true},\"kolaballowsmtpsender\":{\"type\":\"list\",\"optional\":true},\"mail\":{\"optional\":true},\"ou\":{\"type\":\"select\"},\"uniquemember\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true}}}'),(5,'simple','Simple Group (Static)','A simple, traditional LDAP group with a static list of members','{\"auto_form_fields\":[],\"fields\":{\"objectclass\":[\"top\",\"groupofuniquenames\"]},\"form_fields\":{\"cn\":[],\"ou\":{\"type\":\"select\"},\"uniquemember\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true}}}');
+INSERT INTO `group_types` VALUES (1,'kolab','Kolab Distribution Group (Static)','A static Kolab Distribution Group (with mail address)','{\"auto_form_fields\":{\"mail\":{\"data\":[\"cn\"]}},\"fields\":{\"objectclass\":[\"top\",\"groupofuniquenames\",\"kolabgroupofuniquenames\"]},\"form_fields\":{\"cn\":[],\"kolaballowsmtprecipient\":{\"type\":\"list\",\"optional\":true},\"kolaballowsmtpsender\":{\"type\":\"list\",\"optional\":true},\"ou\":{\"type\":\"select\"},\"uniquemember\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true}}}',0),(2,'kolab_dynamic','Kolab Distribution Group (Dynamic)','A dynamic Kolab Distribution Group (with mail address)','{\"auto_form_fields\":{\"mail\":{\"data\":[\"cn\"]}},\"fields\":{\"objectclass\":[\"top\",\"groupofurls\",\"kolabgroupofuniquenames\"]},\"form_fields\":{\"cn\":[],\"kolaballowsmtprecipient\":{\"type\":\"list\",\"optional\":true},\"kolaballowsmtpsender\":{\"type\":\"list\",\"optional\":true},\"memberurl\":{\"type\":\"ldap_url\",\"optional\":true},\"ou\":{\"type\":\"select\"},\"uniquemember\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true}}}',0),(3,'posix','(Pure) POSIX Group','A pure UNIX POSIX Group','{\"auto_form_fields\":{\"gidnumber\":[]},\"fields\":{\"objectclass\":[\"top\",\"groupofuniquenames\",\"posixgroup\"]},\"form_fields\":{\"cn\":[],\"ou\":{\"type\":\"select\"},\"uniquemember\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true}}}',0),(4,'posix_mail','Mail-enabled POSIX Group','A Kolab and also UNIX POSIX Group','{\"auto_form_fields\":{\"gidnumber\":[],\"mail\":{\"data\":[\"cn\"]}},\"fields\":{\"objectclass\":[\"top\",\"groupofuniquenames\",\"kolabgroupofuniquenames\",\"posixgroup\"]},\"form_fields\":{\"cn\":[],\"kolaballowsmtprecipient\":{\"type\":\"list\",\"optional\":true},\"kolaballowsmtpsender\":{\"type\":\"list\",\"optional\":true},\"mail\":{\"optional\":true},\"ou\":{\"type\":\"select\"},\"uniquemember\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true}}}',0),(5,'simple','Simple Group (Static)','A simple, traditional LDAP group with a static list of members','{\"auto_form_fields\":[],\"fields\":{\"objectclass\":[\"top\",\"groupofuniquenames\"]},\"form_fields\":{\"cn\":[],\"ou\":{\"type\":\"select\"},\"uniquemember\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true}}}',0);
/*!40000 ALTER TABLE `group_types` ENABLE KEYS */;
UNLOCK TABLES;
@@ -79,6 +80,7 @@ CREATE TABLE `ou_types` (
`name` varchar(256) NOT NULL,
`description` text NOT NULL,
`attributes` longtext NOT NULL,
+ `is_default` tinyint(1) DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
@@ -90,7 +92,7 @@ CREATE TABLE `ou_types` (
LOCK TABLES `ou_types` WRITE;
/*!40000 ALTER TABLE `ou_types` DISABLE KEYS */;
-INSERT INTO `ou_types` VALUES (1,'unit','Standard Organizational Unit','A standard organizational unit definition','{\"auto_form_fields\":[],\"fields\":{\"objectclass\":[\"top\",\"organizationalunit\"]},\"form_fields\":{\"ou\":[],\"description\":[],\"aci\":{\"optional\":true,\"type\":\"aci\"}}}');
+INSERT INTO `ou_types` VALUES (1,'unit','Standard Organizational Unit','A standard organizational unit definition','{\"auto_form_fields\":[],\"fields\":{\"objectclass\":[\"top\",\"organizationalunit\"]},\"form_fields\":{\"ou\":[],\"description\":[],\"aci\":{\"optional\":true,\"type\":\"aci\"}}}',0);
/*!40000 ALTER TABLE `ou_types` ENABLE KEYS */;
UNLOCK TABLES;
@@ -107,6 +109,7 @@ CREATE TABLE `resource_types` (
`name` varchar(256) NOT NULL,
`description` text NOT NULL,
`attributes` longtext NOT NULL,
+ `is_default` tinyint(1) DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
@@ -118,7 +121,7 @@ CREATE TABLE `resource_types` (
LOCK TABLES `resource_types` WRITE;
/*!40000 ALTER TABLE `resource_types` DISABLE KEYS */;
-INSERT INTO `resource_types` VALUES (1,'collection','Resource Collection','A collection or pool of resources','{\"auto_form_fields\":{\"mail\":{\"data\":[\"cn\"]}},\"fields\":{\"objectclass\":[\"top\",\"groupofuniquenames\",\"kolabgroupofuniquenames\"]},\"form_fields\":{\"cn\":[],\"ou\":{\"type\":\"select\"},\"uniquemember\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true}}}'),(2,'car','Car','A car','{\"auto_form_fields\":{\"cn\":{\"data\":[\"cn\"]},\"kolabtargetfolder\":{\"data\":[\"cn\"]},\"mail\":{\"data\":[\"cn\"]}},\"fields\":{\"objectclass\":[\"top\",\"kolabsharedfolder\",\"mailrecipient\"],\"kolabfoldertype\":[\"event\"]},\"form_fields\":{\"acl\":{\"type\":\"imap_acl\",\"optional\":true},\"cn\":[],\"ou\":{\"type\":\"select\"},\"owner\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true}}}'),(3,'confroom','Conference Room','A conference room','{\"auto_form_fields\":{\"cn\":{\"data\":[\"cn\"]},\"kolabtargetfolder\":{\"data\":[\"cn\"]},\"mail\":{\"data\":[\"cn\"]}},\"fields\":{\"objectclass\":[\"top\",\"kolabsharedfolder\",\"mailrecipient\"],\"kolabfoldertype\":[\"event\"]},\"form_fields\":{\"acl\":{\"type\":\"imap_acl\",\"optional\":true},\"cn\":[],\"ou\":{\"type\":\"select\"},\"owner\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true}}}'),(4,'projector','Projector','A portable overhead projector','{\"auto_form_fields\":{\"cn\":{\"data\":[\"cn\"]},\"kolabtargetfolder\":{\"data\":[\"cn\"]},\"mail\":{\"data\":[\"cn\"]}},\"fields\":{\"objectclass\":[\"top\",\"kolabsharedfolder\",\"mailrecipient\"],\"kolabfoldertype\":[\"event\"]},\"form_fields\":{\"acl\":{\"type\":\"imap_acl\",\"optional\":true},\"cn\":[],\"ou\":{\"type\":\"select\"},\"owner\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true}}}'),(5,'footballtickets','Football Season Tickets','Season tickets to the game (pretty good seats too!)','{\"auto_form_fields\":{\"cn\":{\"data\":[\"cn\"]},\"kolabtargetfolder\":{\"data\":[\"cn\"]},\"mail\":{\"data\":[\"cn\"]}},\"fields\":{\"objectclass\":[\"top\",\"kolabsharedfolder\",\"mailrecipient\"],\"kolabfoldertype\":[\"event\"]},\"form_fields\":{\"acl\":{\"type\":\"imap_acl\",\"optional\":true},\"cn\":[],\"ou\":{\"type\":\"select\"},\"owner\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true}}}');
+INSERT INTO `resource_types` VALUES (1,'collection','Resource Collection','A collection or pool of resources','{\"auto_form_fields\":{\"mail\":{\"data\":[\"cn\"]}},\"fields\":{\"objectclass\":[\"top\",\"groupofuniquenames\",\"kolabgroupofuniquenames\"]},\"form_fields\":{\"cn\":[],\"ou\":{\"type\":\"select\"},\"uniquemember\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true}}}',0),(2,'car','Car','A car','{\"auto_form_fields\":{\"cn\":{\"data\":[\"cn\"]},\"kolabtargetfolder\":{\"data\":[\"cn\"]},\"mail\":{\"data\":[\"cn\"]}},\"fields\":{\"objectclass\":[\"top\",\"kolabsharedfolder\",\"mailrecipient\"],\"kolabfoldertype\":[\"event\"]},\"form_fields\":{\"acl\":{\"type\":\"imap_acl\",\"optional\":true},\"cn\":[],\"ou\":{\"type\":\"select\"},\"owner\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true}}}',0),(3,'confroom','Conference Room','A conference room','{\"auto_form_fields\":{\"cn\":{\"data\":[\"cn\"]},\"kolabtargetfolder\":{\"data\":[\"cn\"]},\"mail\":{\"data\":[\"cn\"]}},\"fields\":{\"objectclass\":[\"top\",\"kolabsharedfolder\",\"mailrecipient\"],\"kolabfoldertype\":[\"event\"]},\"form_fields\":{\"acl\":{\"type\":\"imap_acl\",\"optional\":true},\"cn\":[],\"ou\":{\"type\":\"select\"},\"owner\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true}}}',0),(4,'projector','Projector','A portable overhead projector','{\"auto_form_fields\":{\"cn\":{\"data\":[\"cn\"]},\"kolabtargetfolder\":{\"data\":[\"cn\"]},\"mail\":{\"data\":[\"cn\"]}},\"fields\":{\"objectclass\":[\"top\",\"kolabsharedfolder\",\"mailrecipient\"],\"kolabfoldertype\":[\"event\"]},\"form_fields\":{\"acl\":{\"type\":\"imap_acl\",\"optional\":true},\"cn\":[],\"ou\":{\"type\":\"select\"},\"owner\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true}}}',0),(5,'footballtickets','Football Season Tickets','Season tickets to the game (pretty good seats too!)','{\"auto_form_fields\":{\"cn\":{\"data\":[\"cn\"]},\"kolabtargetfolder\":{\"data\":[\"cn\"]},\"mail\":{\"data\":[\"cn\"]}},\"fields\":{\"objectclass\":[\"top\",\"kolabsharedfolder\",\"mailrecipient\"],\"kolabfoldertype\":[\"event\"]},\"form_fields\":{\"acl\":{\"type\":\"imap_acl\",\"optional\":true},\"cn\":[],\"ou\":{\"type\":\"select\"},\"owner\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true}}}',0);
/*!40000 ALTER TABLE `resource_types` ENABLE KEYS */;
UNLOCK TABLES;
@@ -135,6 +138,7 @@ CREATE TABLE `role_types` (
`name` varchar(256) NOT NULL,
`description` text NOT NULL,
`attributes` longtext NOT NULL,
+ `is_default` tinyint(1) DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
@@ -146,7 +150,7 @@ CREATE TABLE `role_types` (
LOCK TABLES `role_types` WRITE;
/*!40000 ALTER TABLE `role_types` DISABLE KEYS */;
-INSERT INTO `role_types` VALUES (1,'simple_managed','Standard Role','A standard role definition','{\"auto_form_fields\":[],\"fields\":{\"objectclass\":[\"top\",\"ldapsubentry\",\"nsroledefinition\",\"nssimpleroledefinition\",\"nsmanagedroledefinition\"]},\"form_fields\":{\"cn\":[],\"description\":[]}}');
+INSERT INTO `role_types` VALUES (1,'simple_managed','Standard Role','A standard role definition','{\"auto_form_fields\":[],\"fields\":{\"objectclass\":[\"top\",\"ldapsubentry\",\"nsroledefinition\",\"nssimpleroledefinition\",\"nsmanagedroledefinition\"]},\"form_fields\":{\"cn\":[],\"description\":[]}}',0);
/*!40000 ALTER TABLE `role_types` ENABLE KEYS */;
UNLOCK TABLES;
@@ -163,6 +167,7 @@ CREATE TABLE `sharedfolder_types` (
`name` varchar(256) NOT NULL,
`description` text NOT NULL,
`attributes` longtext NOT NULL,
+ `is_default` tinyint(1) DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
@@ -174,7 +179,7 @@ CREATE TABLE `sharedfolder_types` (
LOCK TABLES `sharedfolder_types` WRITE;
/*!40000 ALTER TABLE `sharedfolder_types` DISABLE KEYS */;
-INSERT INTO `sharedfolder_types` VALUES (1,'addressbook','Shared Address Book','A shared address book','{\"auto_form_fields\":[],\"fields\":{\"kolabfoldertype\":[\"contact\"],\"objectclass\":[\"top\",\"kolabsharedfolder\"]},\"form_fields\":{\"acl\":{\"type\":\"imap_acl\",\"optional\":true,\"default\":\"anyone, lrs\"},\"cn\":[]}}'),(2,'calendar','Shared Calendar','A shared calendar','{\"auto_form_fields\":[],\"fields\":{\"kolabfoldertype\":[\"event\"],\"objectclass\":[\"top\",\"kolabsharedfolder\"]},\"form_fields\":{\"acl\":{\"type\":\"imap_acl\",\"optional\":true,\"default\":\"anyone, lrs\"},\"cn\":[]}}'),(3,'journal','Shared Journal','A shared journal','{\"auto_form_fields\":[],\"fields\":{\"kolabfoldertype\":[\"journal\"],\"objectclass\":[\"top\",\"kolabsharedfolder\"]},\"form_fields\":{\"acl\":{\"type\":\"imap_acl\",\"optional\":true,\"default\":\"anyone, lrs\"},\"cn\":[]}}'),(4,'task','Shared Tasks','A shared tasks folder','{\"auto_form_fields\":[],\"fields\":{\"kolabfoldertype\":[\"task\"],\"objectclass\":[\"top\",\"kolabsharedfolder\"]},\"form_fields\":{\"acl\":{\"type\":\"imap_acl\",\"optional\":true,\"default\":\"anyone, lrs\"},\"cn\":[]}}'),(5,'note','Shared Notes','A shared Notes folder','{\"auto_form_fields\":[],\"fields\":{\"kolabfoldertype\":[\"note\"],\"objectclass\":[\"top\",\"kolabsharedfolder\"]},\"form_fields\":{\"acl\":{\"type\":\"imap_acl\",\"optional\":true,\"default\":\"anyone, lrs\"},\"cn\":[]}}'),(6,'file','Shared Files','A shared Files folder','{\"auto_form_fields\":[],\"fields\":{\"kolabfoldertype\":[\"file\"],\"objectclass\":[\"top\",\"kolabsharedfolder\"]},\"form_fields\":{\"acl\":{\"type\":\"imap_acl\",\"optional\":true,\"default\":\"anyone, lrs\"},\"cn\":[]}}'),(7,'mail','Shared Mail Folder','A shared mail folder','{\"auto_form_fields\":[],\"fields\":{\"kolabfoldertype\":[\"mail\"],\"objectclass\":[\"top\",\"kolabsharedfolder\",\"mailrecipient\"]},\"form_fields\":{\"acl\":{\"type\":\"imap_acl\",\"optional\":true,\"default\":\"anyone, lrs\"},\"cn\":[],\"alias\":{\"type\":\"list\",\"optional\":true},\"kolabdelegate\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true},\"kolaballowsmtprecipient\":{\"type\":\"list\",\"optional\":true},\"kolaballowsmtpsender\":{\"type\":\"list\",\"optional\":true},\"kolabtargetfolder\":[],\"mail\":[]}}');
+INSERT INTO `sharedfolder_types` VALUES (1,'addressbook','Shared Address Book','A shared address book','{\"auto_form_fields\":[],\"fields\":{\"kolabfoldertype\":[\"contact\"],\"objectclass\":[\"top\",\"kolabsharedfolder\"]},\"form_fields\":{\"acl\":{\"type\":\"imap_acl\",\"optional\":true,\"default\":\"anyone, lrs\"},\"cn\":[]}}',0),(2,'calendar','Shared Calendar','A shared calendar','{\"auto_form_fields\":[],\"fields\":{\"kolabfoldertype\":[\"event\"],\"objectclass\":[\"top\",\"kolabsharedfolder\"]},\"form_fields\":{\"acl\":{\"type\":\"imap_acl\",\"optional\":true,\"default\":\"anyone, lrs\"},\"cn\":[]}}',0),(3,'journal','Shared Journal','A shared journal','{\"auto_form_fields\":[],\"fields\":{\"kolabfoldertype\":[\"journal\"],\"objectclass\":[\"top\",\"kolabsharedfolder\"]},\"form_fields\":{\"acl\":{\"type\":\"imap_acl\",\"optional\":true,\"default\":\"anyone, lrs\"},\"cn\":[]}}',0),(4,'task','Shared Tasks','A shared tasks folder','{\"auto_form_fields\":[],\"fields\":{\"kolabfoldertype\":[\"task\"],\"objectclass\":[\"top\",\"kolabsharedfolder\"]},\"form_fields\":{\"acl\":{\"type\":\"imap_acl\",\"optional\":true,\"default\":\"anyone, lrs\"},\"cn\":[]}}',0),(5,'note','Shared Notes','A shared Notes folder','{\"auto_form_fields\":[],\"fields\":{\"kolabfoldertype\":[\"note\"],\"objectclass\":[\"top\",\"kolabsharedfolder\"]},\"form_fields\":{\"acl\":{\"type\":\"imap_acl\",\"optional\":true,\"default\":\"anyone, lrs\"},\"cn\":[]}}',0),(6,'file','Shared Files','A shared Files folder','{\"auto_form_fields\":[],\"fields\":{\"kolabfoldertype\":[\"file\"],\"objectclass\":[\"top\",\"kolabsharedfolder\"]},\"form_fields\":{\"acl\":{\"type\":\"imap_acl\",\"optional\":true,\"default\":\"anyone, lrs\"},\"cn\":[]}}',0),(7,'mail','Shared Mail Folder','A shared mail folder','{\"auto_form_fields\":[],\"fields\":{\"kolabfoldertype\":[\"mail\"],\"objectclass\":[\"top\",\"kolabsharedfolder\",\"mailrecipient\"]},\"form_fields\":{\"acl\":{\"type\":\"imap_acl\",\"optional\":true,\"default\":\"anyone, lrs\"},\"cn\":[],\"alias\":{\"type\":\"list\",\"optional\":true},\"kolabdelegate\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true},\"kolaballowsmtprecipient\":{\"type\":\"list\",\"optional\":true},\"kolaballowsmtpsender\":{\"type\":\"list\",\"optional\":true},\"kolabtargetfolder\":[],\"mail\":[]}}',0);
/*!40000 ALTER TABLE `sharedfolder_types` ENABLE KEYS */;
UNLOCK TABLES;
@@ -192,6 +197,7 @@ CREATE TABLE `user_types` (
`description` text NOT NULL,
`attributes` longtext NOT NULL,
`used_for` varchar(16) DEFAULT NULL,
+ `is_default` tinyint(1) DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
@@ -203,7 +209,7 @@ CREATE TABLE `user_types` (
LOCK TABLES `user_types` WRITE;
/*!40000 ALTER TABLE `user_types` DISABLE KEYS */;
-INSERT INTO `user_types` VALUES (1,'kolab','Kolab User','A Kolab User','{\"auto_form_fields\":{\"alias\":{\"type\":\"list\",\"data\":[\"givenname\",\"preferredlanguage\",\"sn\"]},\"cn\":{\"data\":[\"givenname\",\"sn\"]},\"displayname\":{\"data\":[\"givenname\",\"sn\"]},\"mail\":{\"data\":[\"givenname\",\"preferredlanguage\",\"sn\"]},\"mailhost\":{\"optional\":true},\"uid\":{\"data\":[\"givenname\",\"preferredlanguage\",\"sn\"]},\"userpassword\":{\"optional\":true}},\"form_fields\":{\"alias\":{\"optional\":true},\"givenname\":[],\"initials\":{\"optional\":true},\"kolabdelegate\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true},\"kolabinvitationpolicy\":{\"type\":\"select\",\"values\":[\"\",\"ACT_MANUAL\",\"ACT_REJECT\"],\"optional\":true},\"kolaballowsmtprecipient\":{\"type\":\"list\",\"optional\":true},\"kolaballowsmtpsender\":{\"type\":\"list\",\"optional\":true},\"l\":{\"optional\":true},\"mailalternateaddress\":{\"type\":\"list\",\"optional\":true},\"mailquota\":{\"type\":\"text-quota\",\"optional\":true},\"mobile\":{\"optional\":true},\"nsroledn\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true},\"o\":{\"optional\":true},\"ou\":{\"type\":\"select\"},\"pager\":{\"optional\":true},\"postalcode\":{\"optional\":true},\"preferredlanguage\":{\"type\":\"select\"},\"sn\":[],\"street\":{\"optional\":true},\"telephonenumber\":{\"optional\":true},\"title\":{\"optional\":true},\"userpassword\":{\"optional\":true}},\"fields\":{\"objectclass\":[\"top\",\"inetorgperson\",\"kolabinetorgperson\",\"mailrecipient\",\"organizationalperson\",\"person\"]}}',NULL),(2,'posix','POSIX User','A POSIX user (with a home directory and shell access)','{\"auto_form_fields\":{\"cn\":{\"data\":[\"givenname\",\"sn\"]},\"displayname\":{\"data\":[\"givenname\",\"sn\"]},\"gidnumber\":[],\"homedirectory\":{\"data\":[\"givenname\",\"sn\"]},\"uid\":{\"data\":[\"givenname\",\"sn\"]},\"uidnumber\":[],\"userpassword\":{\"optional\":true}},\"form_fields\":{\"givenname\":[],\"initials\":{\"optional\":true},\"preferredlanguage\":{\"type\":\"select\",\"values\":[\"en_US\",\"de_DE\",\"de_CH\",\"en_GB\",\"fi_FI\",\"fr_FR\",\"hu_HU\"]},\"loginshell\":{\"type\":\"select\",\"values\":[\"/bin/bash\",\"/usr/bin/git-shell\",\"/sbin/nologin\"]},\"ou\":{\"type\":\"select\"},\"sn\":[],\"title\":{\"optional\":true},\"userpassword\":{\"optional\":true}},\"fields\":{\"objectclass\":[\"top\",\"inetorgperson\",\"organizationalperson\",\"person\",\"posixaccount\"]}}',NULL),(3,'kolab_posix','Mail-enabled POSIX User','A mail-enabled POSIX User','{\"auto_form_fields\":{\"alias\":{\"data\":[\"givenname\",\"preferredlanguage\",\"sn\"]},\"cn\":{\"data\":[\"givenname\",\"preferredlanguage\",\"sn\"]},\"displayname\":{\"data\":[\"givenname\",\"preferredlanguage\",\"sn\"]},\"gidnumber\":[],\"homedirectory\":{\"data\":[\"givenname\",\"preferredlanguage\",\"sn\"]},\"mail\":{\"data\":[\"givenname\",\"preferredlanguage\",\"sn\"]},\"mailhost\":{\"optional\":true},\"uid\":{\"data\":[\"givenname\",\"preferredlanguage\",\"sn\"]},\"uidnumber\":[],\"userpassword\":{\"optional\":true}},\"form_fields\":{\"alias\":{\"optional\":true},\"givenname\":[],\"initials\":{\"optional\":true},\"kolabdelegate\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true},\"kolabinvitationpolicy\":{\"type\":\"select\",\"values\":[\"\",\"ACT_MANUAL\",\"ACT_REJECT\"],\"optional\":true},\"kolaballowsmtprecipient\":{\"type\":\"list\",\"optional\":true},\"kolaballowsmtpsender\":{\"type\":\"list\",\"optional\":true},\"l\":{\"optional\":true},\"loginshell\":{\"type\":\"select\",\"values\":[\"/bin/bash\",\"/usr/bin/git-shell\",\"/sbin/nologin\"]},\"mailalternateaddress\":{\"type\":\"list\",\"optional\":true},\"mailquota\":{\"type\":\"text-quota\",\"optional\":true},\"mobile\":{\"optional\":true},\"nsroledn\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true},\"o\":{\"optional\":true},\"ou\":{\"type\":\"select\"},\"pager\":{\"optional\":true},\"postalcode\":{\"optional\":true},\"preferredlanguage\":{\"type\":\"select\"},\"sn\":[],\"street\":{\"optional\":true},\"telephonenumber\":{\"optional\":true},\"title\":{\"optional\":true},\"userpassword\":{\"optional\":true}},\"fields\":{\"objectclass\":[\"top\",\"inetorgperson\",\"kolabinetorgperson\",\"mailrecipient\",\"organizationalperson\",\"person\",\"posixaccount\"]}}',NULL),(4,'contact','Contact','A global address book contact','{\"auto_form_fields\":{\"cn\":{\"data\":[\"givenname\",\"sn\"]},\"displayname\":{\"data\":[\"givenname\",\"sn\"]},\"uid\":{\"data\":[\"givenname\",\"sn\"]},\"userpassword\":{\"optional\":true}},\"form_fields\":{\"cn\":{\"optional\":true},\"displayname\":{\"optional\":true},\"givenname\":[],\"initials\":{\"optional\":true},\"l\":{\"optional\":true},\"mail\":{\"type\":\"list\",\"optional\":true},\"mailalternateaddress\":{\"type\":\"list\",\"optional\":true},\"mobile\":{\"optional\":true},\"o\":{\"optional\":true},\"ou\":{\"type\":\"select\"},\"pager\":{\"optional\":true},\"postalcode\":{\"optional\":true},\"sn\":[],\"street\":{\"optional\":true},\"telephonenumber\":{\"optional\":true},\"title\":{\"optional\":true},\"userpassword\":{\"optional\":true}},\"fields\":{\"objectclass\":[\"top\",\"inetorgperson\",\"mailrecipient\",\"organizationalperson\",\"person\"]}}',NULL),(5,'forwarding','Mail Forwarding','A mail forwarding account (forwarding only!)','{\"auto_form_fields\":{\"cn\":{\"data\":[\"givenname\",\"sn\"]},\"displayname\":{\"data\":[\"givenname\",\"sn\"]},\"uid\":{\"data\":[\"givenname\",\"sn\"]},\"userpassword\":{\"optional\":true}},\"form_fields\":{\"cn\":{\"optional\":true},\"displayname\":{\"optional\":true},\"givenname\":[],\"initials\":{\"optional\":true},\"l\":{\"optional\":true},\"mail\":{\"type\":\"list\",\"optional\":true},\"mailalternateaddress\":{\"type\":\"list\",\"optional\":true},\"mailforwardingaddress\":{\"type\":\"list\"},\"mobile\":{\"optional\":true},\"o\":{\"optional\":true},\"ou\":{\"type\":\"select\"},\"pager\":{\"optional\":true},\"postalcode\":{\"optional\":true},\"sn\":[],\"street\":{\"optional\":true},\"telephonenumber\":{\"optional\":true},\"title\":{\"optional\":true},\"userpassword\":{\"optional\":true}},\"fields\":{\"objectclass\":[\"top\",\"inetorgperson\",\"mailrecipient\",\"organizationalperson\",\"person\"]}}',NULL);
+INSERT INTO `user_types` VALUES (1,'kolab','Kolab User','A Kolab User','{\"auto_form_fields\":{\"alias\":{\"type\":\"list\",\"data\":[\"givenname\",\"preferredlanguage\",\"sn\"]},\"cn\":{\"data\":[\"givenname\",\"sn\"]},\"displayname\":{\"data\":[\"givenname\",\"sn\"]},\"mail\":{\"data\":[\"givenname\",\"preferredlanguage\",\"sn\"]},\"mailhost\":{\"optional\":true},\"uid\":{\"data\":[\"givenname\",\"preferredlanguage\",\"sn\"]},\"userpassword\":{\"optional\":true}},\"form_fields\":{\"alias\":{\"optional\":true},\"givenname\":[],\"initials\":{\"optional\":true},\"kolabdelegate\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true},\"kolabinvitationpolicy\":{\"type\":\"select\",\"values\":[\"\",\"ACT_MANUAL\",\"ACT_REJECT\"],\"optional\":true},\"kolaballowsmtprecipient\":{\"type\":\"list\",\"optional\":true},\"kolaballowsmtpsender\":{\"type\":\"list\",\"optional\":true},\"l\":{\"optional\":true},\"mailalternateaddress\":{\"type\":\"list\",\"optional\":true},\"mailquota\":{\"type\":\"text-quota\",\"optional\":true},\"mobile\":{\"optional\":true},\"nsroledn\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true},\"o\":{\"optional\":true},\"ou\":{\"type\":\"select\"},\"pager\":{\"optional\":true},\"postalcode\":{\"optional\":true},\"preferredlanguage\":{\"type\":\"select\"},\"sn\":[],\"street\":{\"optional\":true},\"telephonenumber\":{\"optional\":true},\"title\":{\"optional\":true},\"userpassword\":{\"optional\":true}},\"fields\":{\"objectclass\":[\"top\",\"inetorgperson\",\"kolabinetorgperson\",\"mailrecipient\",\"organizationalperson\",\"person\"]}}',NULL,1),(2,'posix','POSIX User','A POSIX user (with a home directory and shell access)','{\"auto_form_fields\":{\"cn\":{\"data\":[\"givenname\",\"sn\"]},\"displayname\":{\"data\":[\"givenname\",\"sn\"]},\"gidnumber\":[],\"homedirectory\":{\"data\":[\"givenname\",\"sn\"]},\"uid\":{\"data\":[\"givenname\",\"sn\"]},\"uidnumber\":[],\"userpassword\":{\"optional\":true}},\"form_fields\":{\"givenname\":[],\"initials\":{\"optional\":true},\"preferredlanguage\":{\"type\":\"select\",\"values\":[\"en_US\",\"de_DE\",\"de_CH\",\"en_GB\",\"fi_FI\",\"fr_FR\",\"hu_HU\"]},\"loginshell\":{\"type\":\"select\",\"values\":[\"/bin/bash\",\"/usr/bin/git-shell\",\"/sbin/nologin\"]},\"ou\":{\"type\":\"select\"},\"sn\":[],\"title\":{\"optional\":true},\"userpassword\":{\"optional\":true}},\"fields\":{\"objectclass\":[\"top\",\"inetorgperson\",\"organizationalperson\",\"person\",\"posixaccount\"]}}',NULL,0),(3,'kolab_posix','Mail-enabled POSIX User','A mail-enabled POSIX User','{\"auto_form_fields\":{\"alias\":{\"data\":[\"givenname\",\"preferredlanguage\",\"sn\"]},\"cn\":{\"data\":[\"givenname\",\"preferredlanguage\",\"sn\"]},\"displayname\":{\"data\":[\"givenname\",\"preferredlanguage\",\"sn\"]},\"gidnumber\":[],\"homedirectory\":{\"data\":[\"givenname\",\"preferredlanguage\",\"sn\"]},\"mail\":{\"data\":[\"givenname\",\"preferredlanguage\",\"sn\"]},\"mailhost\":{\"optional\":true},\"uid\":{\"data\":[\"givenname\",\"preferredlanguage\",\"sn\"]},\"uidnumber\":[],\"userpassword\":{\"optional\":true}},\"form_fields\":{\"alias\":{\"optional\":true},\"givenname\":[],\"initials\":{\"optional\":true},\"kolabdelegate\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true},\"kolabinvitationpolicy\":{\"type\":\"select\",\"values\":[\"\",\"ACT_MANUAL\",\"ACT_REJECT\"],\"optional\":true},\"kolaballowsmtprecipient\":{\"type\":\"list\",\"optional\":true},\"kolaballowsmtpsender\":{\"type\":\"list\",\"optional\":true},\"l\":{\"optional\":true},\"loginshell\":{\"type\":\"select\",\"values\":[\"/bin/bash\",\"/usr/bin/git-shell\",\"/sbin/nologin\"]},\"mailalternateaddress\":{\"type\":\"list\",\"optional\":true},\"mailquota\":{\"type\":\"text-quota\",\"optional\":true},\"mobile\":{\"optional\":true},\"nsroledn\":{\"type\":\"list\",\"autocomplete\":true,\"optional\":true},\"o\":{\"optional\":true},\"ou\":{\"type\":\"select\"},\"pager\":{\"optional\":true},\"postalcode\":{\"optional\":true},\"preferredlanguage\":{\"type\":\"select\"},\"sn\":[],\"street\":{\"optional\":true},\"telephonenumber\":{\"optional\":true},\"title\":{\"optional\":true},\"userpassword\":{\"optional\":true}},\"fields\":{\"objectclass\":[\"top\",\"inetorgperson\",\"kolabinetorgperson\",\"mailrecipient\",\"organizationalperson\",\"person\",\"posixaccount\"]}}',NULL,0),(4,'contact','Contact','A global address book contact','{\"auto_form_fields\":{\"cn\":{\"data\":[\"givenname\",\"sn\"]},\"displayname\":{\"data\":[\"givenname\",\"sn\"]},\"uid\":{\"data\":[\"givenname\",\"sn\"]},\"userpassword\":{\"optional\":true}},\"form_fields\":{\"cn\":{\"optional\":true},\"displayname\":{\"optional\":true},\"givenname\":[],\"initials\":{\"optional\":true},\"l\":{\"optional\":true},\"mail\":{\"type\":\"list\",\"optional\":true},\"mailalternateaddress\":{\"type\":\"list\",\"optional\":true},\"mobile\":{\"optional\":true},\"o\":{\"optional\":true},\"ou\":{\"type\":\"select\"},\"pager\":{\"optional\":true},\"postalcode\":{\"optional\":true},\"sn\":[],\"street\":{\"optional\":true},\"telephonenumber\":{\"optional\":true},\"title\":{\"optional\":true},\"userpassword\":{\"optional\":true}},\"fields\":{\"objectclass\":[\"top\",\"inetorgperson\",\"mailrecipient\",\"organizationalperson\",\"person\"]}}',NULL,0),(5,'forwarding','Mail Forwarding','A mail forwarding account (forwarding only!)','{\"auto_form_fields\":{\"cn\":{\"data\":[\"givenname\",\"sn\"]},\"displayname\":{\"data\":[\"givenname\",\"sn\"]},\"uid\":{\"data\":[\"givenname\",\"sn\"]},\"userpassword\":{\"optional\":true}},\"form_fields\":{\"cn\":{\"optional\":true},\"displayname\":{\"optional\":true},\"givenname\":[],\"initials\":{\"optional\":true},\"l\":{\"optional\":true},\"mail\":{\"type\":\"list\",\"optional\":true},\"mailalternateaddress\":{\"type\":\"list\",\"optional\":true},\"mailforwardingaddress\":{\"type\":\"list\"},\"mobile\":{\"optional\":true},\"o\":{\"optional\":true},\"ou\":{\"type\":\"select\"},\"pager\":{\"optional\":true},\"postalcode\":{\"optional\":true},\"sn\":[],\"street\":{\"optional\":true},\"telephonenumber\":{\"optional\":true},\"title\":{\"optional\":true},\"userpassword\":{\"optional\":true}},\"fields\":{\"objectclass\":[\"top\",\"inetorgperson\",\"mailrecipient\",\"organizationalperson\",\"person\"]}}',NULL,0);
/*!40000 ALTER TABLE `user_types` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
diff --git a/doc/sample-insert-user_types.php b/doc/sample-insert-user_types.php
index d457f5e..a9e173d 100644
--- a/doc/sample-insert-user_types.php
+++ b/doc/sample-insert-user_types.php
@@ -149,9 +149,9 @@
),
);
- $result = $db->query("INSERT INTO `user_types` (`key`, `name`, `description`, `attributes`) " .
- "VALUES ('kolab','Kolab User', 'A Kolab User'," .
- "'" . json_encode($attributes) . "')");
+ $result = $db->query("INSERT INTO `user_types` (`key`, `name`, `description`, `attributes`, `is_default`) " .
+ "VALUES ('kolab','Kolab User', 'A Kolab User', " .
+ "'" . json_encode($attributes) . "', 1)");
$attributes = Array(
"auto_form_fields" => Array(