summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules-available/permissionmanager/install.inc.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules-available/permissionmanager/install.inc.php b/modules-available/permissionmanager/install.inc.php
index 5d1f60da..9ff5a2d4 100644
--- a/modules-available/permissionmanager/install.inc.php
+++ b/modules-available/permissionmanager/install.inc.php
@@ -120,6 +120,8 @@ if (Database::exec("INSERT INTO `role` (roleid, rolename, builtin, roledescripti
// Assign roles to location (all)
Database::exec("DELETE FROM role_x_location WHERE roleid IN (1,2,3,4)");
Database::exec("INSERT INTO `role_x_location` VALUES (1,NULL),(2,NULL),(3,NULL),(4,NULL)");
+ // In case user fiddled around before
+ Database::exec("DELETE FROM role_x_permission WHERE roleid IN (1,2,3,4)");
// Assign permissions to roles
Database::exec("INSERT IGNORE INTO `role_x_permission` VALUES
(3,'exams.exams.*'),
@@ -195,6 +197,7 @@ if (Database::exec("INSERT INTO `role` (roleid, rolename, builtin, roledescripti
(2,'systemstatus.*'),
(2,'vmstore.edit'),
(2,'webinterface.*')");
+ Database::exec("OPTIMIZE TABLE role_x_permission");
// Assign the first user to the superadmin role (if one exists)
Database::exec("INSERT IGNORE INTO `role_x_user` VALUES (1,1)");
$res[] = UPDATE_DONE;