X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/ab284f0e5be219f5560844cfc5e4c0a48ba1142a..a2cf5ce7f9c827da299ef19e3fa56030f8cdbf79:/mysql.sql

diff --git a/mysql.sql b/mysql.sql
index fad0f92d..9d690111 100644
--- a/mysql.sql
+++ b/mysql.sql
@@ -409,6 +409,10 @@ CREATE TABLE `tt_roles` (
 # Create an index that guarantees unique active and inactive role ranks in each group.
 create unique index role_idx on tt_roles(team_id, rank, status);
 
+# Insert site-wide roles - site administrator and top manager.
+INSERT INTO `tt_roles` (`team_id`, `name`, `rank`, `rights`) VALUES (0, 'Site administrator', 1024, 'administer_site');
+INSERT INTO `tt_roles` (`team_id`, `name`, `rank`, `rights`) VALUES (0, 'Top manager', 512, 'data_entry,view_own_data,manage_own_settings,view_users,on_behalf_data_entry,view_data,override_punch_mode,swap_roles,approve_timesheets,manage_users,manage_projects,manage_tasks,manage_custom_fields,manage_clients,manage_invoices,manage_features,manage_basic_settings,manage_advanced_settings,manage_roles,export_data,manage_subgroups');
+# TODO: move this code above, create roles before creating admin account and assign admin account its role.
 
 #
 # Structure for table tt_site_config. This table stores configuration data
@@ -423,4 +427,4 @@ CREATE TABLE `tt_site_config` (
   PRIMARY KEY  (`param_name`)
 );
 
-INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.17.34', now()); # TODO: change when structure changes.
+INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.17.35', now()); # TODO: change when structure changes.
