Add the 'user' perm to all valid account types.
[platal.git] / upgrade / 1.1.3 / 04_accounts.sql
diff --git a/upgrade/1.1.3/04_accounts.sql b/upgrade/1.1.3/04_accounts.sql
new file mode 100644 (file)
index 0000000..b0b4273
--- /dev/null
@@ -0,0 +1,4 @@
+ALTER TABLE account_types
+CHANGE perms perms SET('groups','mail','directory_ax','directory_private','edit_directory','forums','lists','payment','api_user_readonly','gapps', 'user') NOT NULL DEFAULT '';
+
+UPDATE account_types SET perms = CONCAT(perms, ',user') WHERE type IN ('ax', 'fx', 'master', 'phd', 'pi', 'school', 'x');