PageRenderTime 47ms CodeModel.GetById 12ms RepoModel.GetById 1ms app.codeStats 0ms

/db/mysql/bootstrap.sql

#
SQL | 210 lines | 185 code | 10 blank | 15 comment | 0 complexity | 4bf7f6dd90bd2e0bd96ba0829c838eec MD5 | raw file
Possible License(s): AGPL-3.0
  1. -- Initial values: the admin project and user. It's easier to create
  2. -- them with static values than asking the user to register a user and
  3. -- the 'siteadmin' project with a special handling in the web
  4. -- interface.
  5. -- user 'admin', password 'admin'
  6. -- (account/register.php)
  7. INSERT INTO user (user_name, user_pw, add_date, status, realname)
  8. VALUES ('admin', '$6$vzIAmmEN6zm7td8o$On4O229qcLwPZ2hCayDu9exc8tPAmrM18aUt07V5RAQPApUUutW3oEngsb1N/fO9KZ5YO7NXao1DrA7GVX2u51', UNIX_TIMESTAMP(NOW()), 'A', 'Administrator');
  9. -- siteadmin project
  10. -- (register/*)
  11. -- (siteadmin/triggercreation.php)
  12. INSERT INTO groups
  13. (unix_group_name, group_name, status, is_public, type,
  14. register_time, short_description,
  15. use_homepage, use_mail, use_cvs, use_news, use_task, use_support, use_bugs, use_download)
  16. VALUES
  17. ('siteadmin', 'Site Administration', 'A', 1, 1,
  18. UNIX_TIMESTAMP(NOW()), "This project is dedicated to the administration of this site.",
  19. 1, 1, 1, 1, 1, 1, 1, 1);
  20. -- (include/member.php)
  21. INSERT INTO user_group (user_id, group_id, admin_flags) VALUES (101, LAST_INSERT_ID(), 'A');
  22. INSERT INTO group_history(group_id,field_name,old_value,mod_by,date)
  23. VALUES ((SELECT group_id FROM groups WHERE unix_group_name = 'siteadmin'),
  24. 'Added User', 'admin', 101, UNIX_TIMESTAMP(NOW()));
  25. -- We also add a specific field for the task tracker (we need to copy the None field)
  26. INSERT INTO task_field_value (bug_field_id, group_id, value_id, value, description, order_id, status)
  27. VALUES (103,101,100,'None','',10,'P'),
  28. (103,101,1,'Project Approval','Pending project registration',11,'P');
  29. -- We also need to make the task tracker post restriction of comment
  30. -- accepting posting from logged-in users, otherwise they wont be able
  31. -- to comment their registration
  32. INSERT INTO groups_default_permissions (group_id,task_rflags) VALUES (101,300);
  33. -- We add the default recipes grabbed from update/1.3/
  34. INSERT INTO cookbook (group_id, status_id, severity, privacy, category_id, submitted_by, assigned_to, date, summary, details, resolution_id)
  35. VALUES (101, '3', '5', '1', '100', '100', '100', '1133253163', 'Getting back lost password', '".addslashes("If you lose your password simply visit the login page and click \"Lost Your Password?\".
  36. A confirmation mail will be sent to the address we have on file for you. Then, load the URL in the email to reset your password.")."', '1');
  37. INSERT INTO cookbook_context2recipe (recipe_id, group_id, audience_anonymous, audience_loggedin, audience_members, audience_technicians, audience_managers, context_project, context_homepage, context_cookbook, context_download, context_support, context_bugs, context_task, context_patch, context_news, context_mail, context_cvs, context_arch, context_svn, context_my, context_stats, context_siteadmin, context_people, subcontext_browsing, subcontext_postitem, subcontext_edititem, subcontext_search, subcontext_configure )
  38. VALUES (LAST_INSERT_ID(), 101, '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '0', '0');
  39. INSERT INTO cookbook (group_id, status_id, severity, privacy, category_id, submitted_by, assigned_to, date, summary, details, resolution_id)
  40. VALUES (101, '3', '5', '1', '100', '100', '100', '1133253163', 'Why log in?', 'The log-in mechanism used in these webpages is just a simple way of keeping track of users who work in projects hosted in this site. When a user logs in, she/he is conducted to a personal page that lists the projects she/he is collaborating with and any pending tasks that she/he might have.
  41. If you are involved in any project, if you do not intend to post items on the site, you don\'t need to log in since it will make no difference.
  42. If you want to register a project of your own to be hosted in this site, you must first log in, because every project must have at least one administrator and we need to know your user name to make you the administrator of the project.
  43. In order to log in, you must be registered (using "New User" in the menu) and give the user name and password selected during your registration.', '1');
  44. INSERT INTO cookbook_context2recipe (recipe_id, group_id, audience_anonymous, audience_loggedin, audience_members, audience_technicians, audience_managers, context_project, context_homepage, context_cookbook, context_download, context_support, context_bugs, context_task, context_patch, context_news, context_mail, context_cvs, context_arch, context_svn, context_my, context_stats, context_siteadmin, context_people, subcontext_browsing, subcontext_postitem, subcontext_edititem, subcontext_search, subcontext_configure )
  45. VALUES (LAST_INSERT_ID(), 101, '1', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '0', '0');
  46. INSERT INTO cookbook (group_id, status_id, severity, privacy, category_id, submitted_by, assigned_to, date, summary, details, resolution_id)
  47. VALUES (101, '3', '5', '1', '100', '100', '100', '1133253163', 'Delays on update', 'Several function related to mail aliases, external services access (SVN, CVS...), user additions, group member changes, CVS, etc, are performed via a cronjob on a regular basis.
  48. Changes made on the web site may appear to be live but will not take effect until the next cron update.', '1');
  49. INSERT INTO cookbook_context2recipe (recipe_id, group_id, audience_anonymous, audience_loggedin, audience_members, audience_technicians, audience_managers, context_project, context_homepage, context_cookbook, context_download, context_support, context_bugs, context_task, context_patch, context_news, context_mail, context_cvs, context_arch, context_svn, context_my, context_stats, context_siteadmin, context_people, subcontext_browsing, subcontext_postitem, subcontext_edititem, subcontext_search, subcontext_configure )
  50. VALUES (LAST_INSERT_ID(), 101, '0', '1', '1', '0', '0', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '0', '0', '0', '0', '0', '0', '0', '1');
  51. # We add the default recipes grabbed from update/3.0/
  52. INSERT INTO cookbook (group_id, status_id, severity, privacy, category_id, submitted_by, assigned_to, date, summary, details, resolution_id) VALUES (101, '3', '5', '1', '100', '100', '100', '1133253163', 'Markup Reminder', 'Savane provides a markup langage that enables you to format text you post in items or items comments. HTML is not allowed for security reasons.
  53. = Basic Text Tags =
  54. Basic Text Tags are available almost everywhere.
  55. *bold* markup is:
  56. +verbatim+
  57. *bold*
  58. -verbatim-
  59. _italic_ markup is:
  60. +verbatim+
  61. _italic_
  62. -verbatim-
  63. urls are automatically made links, additionnaly you can give them a title:
  64. +verbatim+
  65. [http://linkurl Title]
  66. -verbatim-
  67. items references like _tracker #nnn_ will be made links to, like in:
  68. +verbatim+
  69. here is a link to recipe #101.
  70. -verbatim-
  71. = Rich Text Tags =
  72. Rich Text Tags are available in comments.
  73. Unnumbered list markup is:
  74. +verbatim+
  75. * item 1\r
  76. * item 2\r
  77. ** item 2 subitem 1\r
  78. ** item 2 subitem 2\r
  79. -verbatim-
  80. Numbered list markup is:
  81. +verbatim+
  82. 0 item 1\r
  83. 0 item 2\r
  84. -verbatim-
  85. Horizontal ruler markup is:
  86. +verbatim+
  87. ----
  88. -verbatim-
  89. Verbatim markup (useful for code bits) is:
  90. +verbatim+
  91. +verbatim+\r
  92. The piece of code\r
  93. The piece of code, line 2\r
  94. -verbatim-\r
  95. -verbatim-
  96. = Heading Tags =
  97. Heading Text Tags are available in rare places like items original submission, news item content, project description and users resume.
  98. First Level heading markup is:
  99. +verbatim+
  100. = Title =
  101. -verbatim-
  102. Second Level heading markup is:
  103. +verbatim+
  104. == Subtitle ==
  105. -verbatim-
  106. Third Level heading markup is:
  107. +verbatim+
  108. === Subsubtitle ===
  109. -verbatim-
  110. Fourth Level heading markup is:
  111. +verbatim+
  112. ==== Subsubsubtitle ====
  113. -verbatim-
  114. = The Special _No Markup_ Tag =
  115. If for some reason, you want to completely deactivate the markup on a part of a text, you can always use:
  116. +verbatim+
  117. +nomarkup+ Piece of text that will be printed unformatted -nomarkup-
  118. -verbatim-
  119. This tag diverges from the verbatim tag in the sense that it will not cause the relevant text to be formatted as it would be in a text editor, a pure verbatim environment, but simply unformatted. As result, for example, text indentation would be ignored because HTML by default ignores it. So to copy/paste bits of code, software output, you are advised to always use the verbatim tag instead.', '1');
  120. INSERT INTO cookbook_context2recipe (recipe_id, group_id, audience_anonymous, audience_loggedin, audience_members, audience_technicians, audience_managers, context_project, context_homepage, context_cookbook, context_download, context_support, context_bugs, context_task, context_patch, context_news, context_mail, context_cvs, context_arch, context_svn, context_my, context_stats, context_siteadmin, context_people, subcontext_browsing, subcontext_postitem, subcontext_edititem, subcontext_search, subcontext_configure ) VALUES (LAST_INSERT_ID(), 101, '1', '1', '1', '0', '0', '1', '0', '1', '0', '1', '1', '1', '1', '1', '0', '0', '0', '0', '1', '0', '0', '1', '0', '1', '1', '0', '1');
  121. INSERT INTO cookbook (group_id, status_id, severity, privacy, category_id, submitted_by, assigned_to, date, summary, details, resolution_id) VALUES (101, '3', '3', '1', '100', '100', '100', '1133253163', 'Fighting Spam', 'Savane provides several ways to protect trackers from spam.
  122. = Preventing Spam =
  123. Savane runs *DNS blacklists* checks on all forms submitted by non-project members.
  124. Apart from that, there are a few options that can allow a project admin to prevent many spams.
  125. Spam are usually caused by anonymous robots.
  126. * A good starting point to avoid spam is first to set trackers *Posting Restrictions* to a tough policy:
  127. ** On every trackers that you feel dedicated to manage the project workflow, without end-users interaction, like the task manager, set _project membership_ as minimal level of authentication.
  128. ** On every trackers that need input from non-members, like the support manager and the bug tracker, set _logged-in user_ as minimal level of authentication, if you can afford to forbid anonymous post (it means that external contributors will have to create an account)
  129. * Another good idea is too use the special *Lock Discussion* field. This field, that can be modified only by trackers managers, is complementary to the Posting Restrictions. When an item is set as _Locked_, only technicians and managers are still be able to post further comments. While it may be used to end a flamewar, it will obviously reduce the number of targets available to spam robots if you set one (or more) automatic transition update so whenever an item is closed, the item get additionnally locked. Obviously, this is useless on trackers where only project members can post.
  130. = Automatically Checking Potential Spam =
  131. Savane allows to *automatically check posted content with SpamAssassin*.
  132. Any post that Savane feels needs to be crosschecked automatically by SpamAssassin (depends on site configuration) will be delayed, temporarily flagged as spam, when posted until it is checked in the following minutes. If it is found to be spam, no notification will ever be sent, it will stay flagged as spam.
  133. = Removing Spam, Spam Scores =
  134. === Spam Scores ===
  135. Any logged-in user is able, when he sees content (comment or item) that he believes to be spam, to *flag it as spam*. This will increment the spam score of the item.
  136. * If the reporter is _project admin_ on which the suspected spam have been posted, the spam score of the content will grow of 5
  137. * If the reporter is _project member_ on which the suspected spam have been posted, the spam score of the content will grow of 3
  138. * If the reporter is _not project member_ on which the suspected spam have been posted, the spam score of the content will grow of 1
  139. Any *content with a spam score superior or equal to 5 is considered to be spam*.
  140. Each user have also his own spam score. Each time an user got one of his post flagged as spam (spam score > 4), his own score grows of 1. User own spam score is used to determine the spam score of any new post. In other words, someone caught 5 times posting spam will get all his further post automatically flagged as spam as soon as posted.
  141. Site administrators have a specific interface that will allow them to check if spam reports against a user were legitimate and will be able to take necessary actions accordingly (like banning account used to spam or to maliciously report as spam perfectly valid content).
  142. It is also possible to project admins and site admins to unflag content, which means they can reset the spam score of some content if they think there is a mistake.
  143. === Removing Spam ===
  144. When content is considered to be spam (spam score > 4), it is not removed from the database. We do not want to risk loosing data in case of false positives.
  145. However, comments that are spam are automatically removed from items pages, only a link remains for checking purpose.
  146. Also, when browsing items, items that are spams are not shown, unless you change the related display criteria.
  147. If the content is an item, it is automatically set to _Locked_ so further post are impossible.
  148. If your site runs checks with SpamAssassin, *flagged spams will be used to improves bayesian filtering*.', '1');
  149. INSERT INTO cookbook_context2recipe (recipe_id, group_id, audience_anonymous, audience_loggedin, audience_members, audience_technicians, audience_managers, context_project, context_homepage, context_cookbook, context_download, context_support, context_bugs, context_task, context_patch, context_news, context_mail, context_cvs, context_arch, context_svn, context_my, context_stats, context_siteadmin, context_people, subcontext_browsing, subcontext_postitem, subcontext_edititem, subcontext_search, subcontext_configure ) VALUES (LAST_INSERT_ID(), 101, '0', '1', '1', '0', '0', '0', '0', '1', '0', '1', '1', '1', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '0', '1');