You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
4.9 KiB

  1. MySQL database "literature", table "group_permissions"
  2. ======================================================
  3. field names
  4. -----------
  5. fields available in table "group_permissions" description
  6. --------------------------------------------- -----------
  7. group_permission_id the unique ID number of this group permission entry
  8. group_id the group's unique ID number (which corresponds to the group_id number of the group's record entry within the "groups" table)
  9. allow_add specifies whether this group is allowed to add records to the database
  10. allow_edit specifies whether this group is allowed to edit records in the database
  11. allow_delete specifies whether this group is allowed to delete records from the database
  12. allow_download specifies whether this group is allowed to download files which are associated with particular records
  13. allow_upload specifies whether this group is allowed to upload files to the database
  14. allow_details_view specifies whether this group is allowed to view any record details
  15. allow_print_view specifies whether this group is allowed to view records in print view
  16. allow_cite specifies whether this group is allowed to build a reference list from selected records
  17. allow_import specifies whether this group is allowed to import records into the database
  18. allow_batch_import specifies whether this group is allowed to batch import records into the database
  19. allow_export specifies whether this group is allowed to export records from the database
  20. allow_batch_export specifies whether this group is allowed to batch export records from the database
  21. allow_user_groups specifies whether this group is allowed to use the 'user groups' feature
  22. allow_user_queries specifies whether this group is allowed to use the 'user queries' feature
  23. allow_rss_feeds specifies whether this group is allowed to generate dynamic RSS feeds from any query
  24. allow_sql_search specifies whether this group is allowed to execute custom SQL queries via 'sql_search.php'
  25. allow_modify_options specifies whether this group is allowed to change his personal data (like name, address or password)
  26. allow_edit_call_number specifies whether this group is allowed to fully edit the contents of the 'call_number' field (like the database admin)
  27. column types
  28. ------------
  29. group_permission_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY
  30. group_id MEDIUMINT UNSIGNED NOT NULL
  31. allow_add ENUM('yes','no') NOT NULL
  32. allow_edit ENUM('yes','no') NOT NULL
  33. allow_delete ENUM('yes','no') NOT NULL
  34. allow_download ENUM('yes','no') NOT NULL
  35. allow_upload ENUM('yes','no') NOT NULL
  36. allow_details_view ENUM('yes','no') NOT NULL
  37. allow_print_view ENUM('yes','no') NOT NULL
  38. allow_cite ENUM('yes','no') NOT NULL
  39. allow_import ENUM('yes','no') NOT NULL
  40. allow_batch_import ENUM('yes','no') NOT NULL
  41. allow_export ENUM('yes','no') NOT NULL
  42. allow_batch_export ENUM('yes','no') NOT NULL
  43. allow_user_groups ENUM('yes','no') NOT NULL
  44. allow_user_queries ENUM('yes','no') NOT NULL
  45. allow_rss_feeds ENUM('yes','no') NOT NULL
  46. allow_sql_search ENUM('yes','no') NOT NULL
  47. allow_modify_options ENUM('yes','no') NOT NULL
  48. allow_edit_call_number ENUM('no','yes') NOT NULL
  49. INDEX (group_id)
  50. table creation code
  51. -------------------
  52. CREATE TABLE group_permissions (group_permission_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, group_id MEDIUMINT UNSIGNED NOT NULL, allow_add ENUM('yes','no') NOT NULL, allow_edit ENUM('yes','no') NOT NULL, allow_delete ENUM('yes','no') NOT NULL, allow_download ENUM('yes','no') NOT NULL, allow_upload ENUM('yes','no') NOT NULL, allow_details_view ENUM('yes','no') NOT NULL, allow_print_view ENUM('yes','no') NOT NULL, allow_cite ENUM('yes','no') NOT NULL, allow_import ENUM('yes','no') NOT NULL, allow_batch_import ENUM('yes','no') NOT NULL, allow_export ENUM('yes','no') NOT NULL, allow_batch_export ENUM('yes','no') NOT NULL, allow_user_groups ENUM('yes','no') NOT NULL, allow_user_queries ENUM('yes','no') NOT NULL, allow_rss_feeds ENUM('yes','no') NOT NULL, allow_sql_search ENUM('yes','no') NOT NULL, allow_modify_options ENUM('yes','no') NOT NULL, allow_edit_call_number ENUM('no','yes') NOT NULL, INDEX (group_id));
  53. rules for data import
  54. ---------------------
  55. - fields are separated by tabs, records are separated by returns (if not specified otherwise within the LOAD DATA statement)
  56. - order of fields must resemble the above field order!
  57. - DATE format must be YYYY-MM-DD
  58. - TIME format must be HH:MM:SS
  59. - carriage returns *within* fields (ASCII character 11) must be replaced with a "UNIX return" (ASCII character 10) -> Search for: (\x0B) Replace with: \\n
  60. - empty fields are indicated by \N -> Search for: (?<=\t|^)(?=\t|$) Replace with: \\N
  61. - character encoding: higher ASCII chars must be encoded as ISO-8859-1
  62. - file encoding must be UNIX
  63. load data code
  64. --------------
  65. LOAD DATA LOCAL INFILE "/PATH/TO/FILE/group_permissions.txt" INTO TABLE group_permissions;
  66. or, alternatively, use something like the following from your shell:
  67. mysqlimport --local -u root -p YOUR_DB_NAME "/PATH/TO/FILE/group_permissions.txt"