FIX init db structrue and add records of roles
This commit is contained in:
parent
fa98636eb9
commit
a80037ae8a
|
@ -3425,4 +3425,24 @@ BEGIN;
|
||||||
INSERT INTO `laboratory_settings` VALUES (1, 1, '{\"name\":\"EduCoder\",\"navbar\":[{\"name\":\"实践课程\",\"link\":\"/paths\",\"hidden\":false},{\"name\":\"翻转课堂\",\"link\":\"/courses\",\"hidden\":false},{\"name\":\"实现项目\",\"link\":\"/shixuns\",\"hidden\":false},{\"name\":\"在线竞赛\",\"link\":\"/competitions\",\"hidden\":false},{\"name\":\"教学案例\",\"link\":\"/moop_cases\",\"hidden\":false},{\"name\":\"交流问答\",\"link\":\"/forums\",\"hidden\":false}],\"footer\":\"\\n\\u003cp class=\\\"footer_con-p inline lineh-30 font-14\\\"\\u003e\\n \\u003cspan class=\\\"font-18 fl\\\"\\u003e©\\u003c/span\\u003e\\u0026nbsp;2019\\u0026nbsp;EduCoder\\n \\u003ca target=\\\"_blank\\\" href=\\\"http://beian.miit.gov.cn/\\\" class=\\\"ml15 mr15\\\" style=\\\"color: rgb(136, 136, 136);\\\"\\u003e湘ICP备17009477号\\u003c/a\\u003e\\n \\u003ca target=\\\"_blank\\\" href=\\\"http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=43019002000962\\\" class=\\\"mr15\\\" style=\\\"color: rgb(136, 136, 136);\\\"\\u003e\\n \\u003cimg class=\\\"vertical4\\\" src=\\\"https://ali-cdn.educoder.net/react/build/static/media/beian.d0289dc0.png\\\"\\u003e湘公网安备43019002000962号\\n \\u003c/a\\u003e\\n \\u003ca href=\\\"https://team.trustie.net\\\" target=\\\"_blank\\\" style=\\\"color: rgb(136, 136, 136);\\\"\\u003eTrustie\\u003c/a\\u003e\\n \\u0026nbsp;\\u0026nbsp;\\u0026nbsp;\\u0026amp;\\u0026nbsp;\\u0026nbsp;\\u0026nbsp;IntelliDE inside.\\n \\u003cspan class=\\\"mr15\\\"\\u003e版权所有 湖南智擎科技有限公司\\u003c/span\\u003e\\u003c/p\\u003e\\n \"}');
|
INSERT INTO `laboratory_settings` VALUES (1, 1, '{\"name\":\"EduCoder\",\"navbar\":[{\"name\":\"实践课程\",\"link\":\"/paths\",\"hidden\":false},{\"name\":\"翻转课堂\",\"link\":\"/courses\",\"hidden\":false},{\"name\":\"实现项目\",\"link\":\"/shixuns\",\"hidden\":false},{\"name\":\"在线竞赛\",\"link\":\"/competitions\",\"hidden\":false},{\"name\":\"教学案例\",\"link\":\"/moop_cases\",\"hidden\":false},{\"name\":\"交流问答\",\"link\":\"/forums\",\"hidden\":false}],\"footer\":\"\\n\\u003cp class=\\\"footer_con-p inline lineh-30 font-14\\\"\\u003e\\n \\u003cspan class=\\\"font-18 fl\\\"\\u003e©\\u003c/span\\u003e\\u0026nbsp;2019\\u0026nbsp;EduCoder\\n \\u003ca target=\\\"_blank\\\" href=\\\"http://beian.miit.gov.cn/\\\" class=\\\"ml15 mr15\\\" style=\\\"color: rgb(136, 136, 136);\\\"\\u003e湘ICP备17009477号\\u003c/a\\u003e\\n \\u003ca target=\\\"_blank\\\" href=\\\"http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=43019002000962\\\" class=\\\"mr15\\\" style=\\\"color: rgb(136, 136, 136);\\\"\\u003e\\n \\u003cimg class=\\\"vertical4\\\" src=\\\"https://ali-cdn.educoder.net/react/build/static/media/beian.d0289dc0.png\\\"\\u003e湘公网安备43019002000962号\\n \\u003c/a\\u003e\\n \\u003ca href=\\\"https://team.trustie.net\\\" target=\\\"_blank\\\" style=\\\"color: rgb(136, 136, 136);\\\"\\u003eTrustie\\u003c/a\\u003e\\n \\u0026nbsp;\\u0026nbsp;\\u0026nbsp;\\u0026amp;\\u0026nbsp;\\u0026nbsp;\\u0026nbsp;IntelliDE inside.\\n \\u003cspan class=\\\"mr15\\\"\\u003e版权所有 湖南智擎科技有限公司\\u003c/span\\u003e\\u003c/p\\u003e\\n \"}');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of roles
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO `roles` (`id`, `name`, `position`, `assignable`, `builtin`, `permissions`, `issues_visibility`) VALUES
|
||||||
|
(1, 'Non member', 1, 1, 1, '---\n- :upload_attachments\n- :memos_attachments_download\n- :add_project\n- :projects_attachments_download\n- :add_course\n- :course_attachments_download\n- :view_course_files\n- :add_messages\n- :delete_own_messages\n- :view_calendar\n- :view_documents\n- :view_files\n- :view_gantt\n- :view_issues\n- :save_queries\n- :comment_news\n- :browse_repository\n- :view_changesets\n- :view_time_entries\n- :view_wiki_pages\n- :view_wiki_edits\n', 'default'),
|
||||||
|
(2, 'Anonymous', 2, 1, 2, '---\n- :memos_attachments_download\n- :view_course_files\n- :view_calendar\n- :view_documents\n- :view_files\n- :view_gantt\n- :view_issues\n- :browse_repository\n- :view_changesets\n- :view_time_entries\n- :view_wiki_pages\n- :view_wiki_edits\n', 'default'),
|
||||||
|
(3, 'Manager', 3, 1, 0, '---\n- :add_project\n- :edit_project\n- :close_project\n- :select_project_modules\n- :manage_members\n- :manage_versions\n- :add_subprojects\n- :is_manager\n- :projects_attachments_download\n- :as_teacher\n- :add_course\n- :edit_course\n- :close_course\n- :select_course_modules\n- :view_course_journals_for_messages\n- :course_attachments_download\n- :view_course_files\n- :view_homework_attaches\n- :quote_project\n- :manage_boards\n- :add_messages\n- :edit_messages\n- :edit_own_messages\n- :delete_messages\n- :delete_own_messages\n- :view_calendar\n- :view_code_review\n- :add_code_review\n- :edit_code_review\n- :delete_code_review\n- :assign_code_review\n- :code_review_setting\n- :add_documents\n- :edit_documents\n- :delete_documents\n- :view_documents\n- :manage_files\n- :view_files\n- :view_gantt\n- :manage_categories\n- :view_issues\n- :add_issues\n- :edit_issues\n- :manage_issue_relations\n- :manage_subtasks\n- :set_issues_private\n- :set_own_issues_private\n- :add_issue_notes\n- :edit_issue_notes\n- :edit_own_issue_notes\n- :view_private_notes\n- :set_notes_private\n- :move_issues\n- :delete_issues\n- :manage_public_queries\n- :save_queries\n- :view_issue_watchers\n- :add_issue_watchers\n- :delete_issue_watchers\n- :manage_news\n- :comment_news\n- :manage_repository\n- :browse_repository\n- :view_changesets\n- :commit_access\n- :manage_related_issues\n- :log_time\n- :view_time_entries\n- :edit_time_entries\n- :edit_own_time_entries\n- :manage_project_activities\n- :manage_wiki\n- :rename_wiki_pages\n- :delete_wiki_pages\n- :view_wiki_pages\n- :export_wiki_pages\n- :view_wiki_edits\n- :edit_wiki_pages\n- :delete_wiki_pages_attachments\n- :protect_wiki_pages\n', 'all'),
|
||||||
|
(4, 'Developer', 5, 1, 0, '---\n- :add_project\n- :manage_versions\n- :projects_attachments_download\n- :add_course\n- :edit_course\n- :close_course\n- :select_course_modules\n- :view_course_journals_for_messages\n- :course_attachments_download\n- :view_course_files\n- :view_homework_attaches\n- :paret_in_homework\n- :select_contest_modules\n- :quote_project\n- :contest_attachments_download\n- :manage_contestnotifications\n- :notificationcomment_contestnotifications\n- :manage_boards\n- :add_messages\n- :edit_own_messages\n- :delete_own_messages\n- :view_calendar\n- :manage_files\n- :view_files\n- :view_gantt\n- :manage_categories\n- :view_issues\n- :add_issues\n- :edit_issues\n- :manage_issue_relations\n- :manage_subtasks\n- :set_issues_private\n- :set_own_issues_private\n- :add_issue_notes\n- :edit_issue_notes\n- :edit_own_issue_notes\n- :view_private_notes\n- :set_notes_private\n- :move_issues\n- :delete_issues\n- :manage_public_queries\n- :save_queries\n- :view_issue_watchers\n- :add_issue_watchers\n- :delete_issue_watchers\n- :manage_repository\n- :browse_repository\n- :view_changesets\n- :commit_access\n- :manage_related_issues\n', 'all'),
|
||||||
|
(5, 'Reporter', 4, 1, 0, '---\n- :add_project\n- :projects_attachments_download\n- :add_course\n- :edit_course\n- :close_course\n- :select_course_modules\n- :view_course_journals_for_messages\n- :course_attachments_download\n- :view_course_files\n- :view_homework_attaches\n- :manage_boards\n- :add_messages\n- :edit_own_messages\n- :delete_own_messages\n- :view_calendar\n- :view_code_review\n- :manage_files\n- :view_files\n- :view_gantt\n- :view_issues\n- :add_issues\n- :edit_issues\n- :add_issue_notes\n- :edit_own_issue_notes\n- :save_queries\n- :comment_news\n- :browse_repository\n- :view_wiki_pages\n- :export_wiki_pages\n- :view_wiki_edits\n- :edit_wiki_pages\n- :delete_wiki_pages_attachments\n', 'all'),
|
||||||
|
(7, 'TeachingAsistant', 6, 1, 0, '---\n- :add_project\n- :edit_project\n- :manage_members\n- :projects_attachments_download\n- :as_teacher\n- :add_course\n- :edit_course\n- :close_course\n- :select_course_modules\n- :view_course_journals_for_messages\n- :course_attachments_download\n- :view_course_files\n- :view_homework_attaches\n- :manage_boards\n- :add_messages\n- :edit_own_messages\n- :delete_messages\n- :delete_own_messages\n- :view_calendar\n- :view_documents\n- :manage_files\n- :view_files\n- :view_gantt\n- :view_issues\n- :add_issues\n- :add_issue_notes\n- :save_queries\n- :manage_news\n- :comment_news\n- :browse_repository\n- :view_changesets\n- :view_time_entries\n- :view_wiki_pages\n- :export_wiki_pages\n- :view_wiki_edits\n- :edit_wiki_pages\n- :delete_wiki_pages_attachments\n', 'default'),
|
||||||
|
(9, 'Teacher', 7, 1, 0, '---\n- :upload_attachments\n- :memos_attachments_download\n- :add_project\n- :edit_project\n- :close_project\n- :select_project_modules\n- :manage_members\n- :manage_versions\n- :add_subprojects\n- :projects_attachments_download\n- :as_teacher\n- :add_course\n- :edit_course\n- :close_course\n- :select_course_modules\n- :view_course_journals_for_messages\n- :course_attachments_download\n- :view_course_files\n- :view_homework_attaches\n- :manage_boards\n- :add_messages\n- :edit_messages\n- :edit_own_messages\n- :delete_messages\n- :delete_own_messages\n- :view_calendar\n- :add_documents\n- :edit_documents\n- :delete_documents\n- :view_documents\n- :manage_files\n- :view_files\n- :view_gantt\n- :manage_categories\n- :view_issues\n- :add_issues\n- :edit_issues\n- :manage_issue_relations\n- :manage_subtasks\n- :set_issues_private\n- :set_own_issues_private\n- :add_issue_notes\n- :edit_own_issue_notes\n- :view_private_notes\n- :set_notes_private\n- :move_issues\n- :delete_issues\n- :manage_public_queries\n- :save_queries\n- :view_issue_watchers\n- :add_issue_watchers\n- :delete_issue_watchers\n- :manage_news\n- :comment_news\n- :manage_repository\n- :browse_repository\n- :view_changesets\n- :commit_access\n- :manage_related_issues\n- :log_time\n- :view_time_entries\n- :edit_time_entries\n- :edit_own_time_entries\n- :manage_project_activities\n- :manage_wiki\n- :rename_wiki_pages\n- :delete_wiki_pages\n- :view_wiki_pages\n- :export_wiki_pages\n- :view_wiki_edits\n- :edit_wiki_pages\n- :delete_wiki_pages_attachments\n- :protect_wiki_pages\n', 'default'),
|
||||||
|
(10, 'Student', 9, 1, 0, '---\n- :add_project\n- :projects_attachments_download\n- :as_student\n- :add_course\n- :edit_course\n- :close_course\n- :select_course_modules\n- :view_course_journals_for_messages\n- :course_attachments_download\n- :view_course_files\n- :view_homework_attaches\n- :paret_in_homework\n- :manage_boards\n- :add_messages\n- :edit_own_messages\n- :delete_own_messages\n- :view_calendar\n- :view_documents\n- :manage_files\n- :view_files\n- :view_gantt\n- :view_issues\n- :add_issues\n- :add_issue_notes\n- :save_queries\n- :comment_news\n- :browse_repository\n- :view_changesets\n- :view_time_entries\n- :view_wiki_pages\n- :view_wiki_edits\n', 'default'),
|
||||||
|
(11, 'orgManager', 8, 1, 0, '---\n- :add_project\n- :projects_attachments_download\n- :add_course\n- :course_attachments_download\n- :view_course_files\n- :add_messages\n- :delete_own_messages\n- :view_calendar\n- :view_documents\n- :view_files\n- :view_gantt\n- :view_issues\n- :save_queries\n- :comment_news\n- :browse_repository\n- :view_changesets\n- :view_time_entries\n- :view_wiki_pages\n- :view_wiki_edits\n', 'default'),
|
||||||
|
(12, 'orgMember', 10, 1, 0, '---\n- :add_project\n- :projects_attachments_download\n- :add_course\n- :course_attachments_download\n- :view_course_files\n- :add_messages\n- :delete_own_messages\n- :view_calendar\n- :view_documents\n- :view_files\n- :view_gantt\n- :view_issues\n- :save_queries\n- :comment_news\n- :browse_repository\n- :view_changesets\n- :view_time_entries\n- :view_wiki_pages\n- :view_wiki_edits\n', 'default'),
|
||||||
|
(13, 'ContestManager', 11, 1, 0, '---\n- :add_project\n- :projects_attachments_download\n- :add_course\n- :course_attachments_download\n- :view_course_files\n- :select_contest_modules\n- :quote_project\n- :contest_attachments_download\n- :manage_contestnotifications\n- :notificationcomment_contestnotifications\n- :manage_boards\n- :add_messages\n- :edit_messages\n- :edit_own_messages\n- :delete_messages\n- :delete_own_messages\n- :view_calendar\n- :view_files\n- :view_gantt\n- :view_issues\n- :save_queries\n- :browse_repository\n- :view_changesets\n', 'default'),
|
||||||
|
(14, 'Judge', 12, 1, 0, '---\n- :add_project\n- :projects_attachments_download\n- :add_course\n- :course_attachments_download\n- :view_course_files\n- :select_contest_modules\n- :quote_project\n- :contest_attachments_download\n- :manage_contestnotifications\n- :notificationcomment_contestnotifications\n- :manage_boards\n- :add_messages\n- :edit_messages\n- :edit_own_messages\n- :delete_own_messages\n- :view_calendar\n- :manage_files\n- :view_files\n- :view_gantt\n- :view_issues\n- :save_queries\n- :browse_repository\n- :view_changesets\n', 'default'),
|
||||||
|
(15, 'Contestant', 13, 1, 0, '---\n- :add_project\n- :projects_attachments_download\n- :add_course\n- :course_attachments_download\n- :view_course_files\n- :select_contest_modules\n- :quote_project\n- :contest_attachments_download\n- :notificationcomment_contestnotifications\n- :add_messages\n- :edit_own_messages\n- :delete_own_messages\n- :view_calendar\n- :manage_files\n- :view_files\n- :view_gantt\n- :view_issues\n- :save_queries\n- :browse_repository\n- :view_changesets\n', 'default');
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
SET FOREIGN_KEY_CHECKS = 1;
|
SET FOREIGN_KEY_CHECKS = 1;
|
||||||
|
|
Loading…
Reference in New Issue