|
2 | 2 | USE smartcooking; |
3 | 3 |
|
4 | 4 | -- Administrative |
5 | | -CALL insert_responsibility('can_manage_roles', 'Allows the ability to create, edit, or delete user roles and their associated permissions.'); |
6 | | -CALL insert_responsibility('can_view_audit_log', 'Allows access to view detailed records of database activities and changes for auditing purposes.'); |
| 5 | +CALL insert_responsibility( |
| 6 | + 'can_manage_roles', |
| 7 | + 'Allows the ability to create, edit, or delete user roles and their associated permissions.' |
| 8 | +); |
| 9 | +CALL insert_responsibility( |
| 10 | + 'can_view_audit_log', |
| 11 | + 'Allows access to view detailed records of database activities' || |
| 12 | + ' and changes for auditing purposes.' |
| 13 | +); |
7 | 14 |
|
8 | 15 | -- Category management |
9 | | -CALL insert_responsibility('can_create_category', 'Grants the ability to create new categories for organizing content.'); |
10 | | -CALL insert_responsibility('can_edit_category', 'Allows editing existing categories to update their details.'); |
11 | | -CALL insert_responsibility('can_delete_category', 'Grants permission to remove categories from the database.'); |
| 16 | +CALL insert_responsibility( |
| 17 | + 'can_create_category', |
| 18 | + 'Grants the ability to create new categories for organizing content.' |
| 19 | +); |
| 20 | +CALL insert_responsibility( |
| 21 | + 'can_edit_category', |
| 22 | + 'Allows editing existing categories to update their details.' |
| 23 | +); |
| 24 | +CALL insert_responsibility( |
| 25 | + 'can_delete_category', |
| 26 | + 'Grants permission to remove categories from the database.' |
| 27 | +); |
12 | 28 |
|
13 | 29 | -- Comment management |
14 | | -CALL insert_responsibility('can_comment_on_recipe', 'Enables the user to post comments on recipes.'); |
15 | | -CALL insert_responsibility('can_edit_own_comment', 'Allows users to edit their own comments.'); |
16 | | -CALL insert_responsibility('can_edit_any_comment', 'Grants the ability to modify any comment in the system.'); |
17 | | -CALL insert_responsibility('can_delete_own_comment', 'Enables users to delete their own comments.'); |
18 | | -CALL insert_responsibility('can_delete_any_comment', 'Grants the ability to remove any comment from the system.'); |
| 30 | +CALL insert_responsibility( |
| 31 | + 'can_comment_on_recipe', |
| 32 | + 'Enables the user to post comments on recipes.' |
| 33 | +); |
| 34 | +CALL insert_responsibility( |
| 35 | + 'can_edit_own_comment', |
| 36 | + 'Allows users to edit their own comments.' |
| 37 | +); |
| 38 | +CALL insert_responsibility( |
| 39 | + 'can_edit_any_comment', |
| 40 | + 'Grants the ability to modify any comment in the system.' |
| 41 | +); |
| 42 | +CALL insert_responsibility( |
| 43 | + 'can_delete_own_comment', |
| 44 | + 'Enables users to delete their own comments.' |
| 45 | +); |
| 46 | +CALL insert_responsibility( |
| 47 | + 'can_delete_any_comment', |
| 48 | + 'Grants the ability to remove any comment from the system.' |
| 49 | +); |
19 | 50 |
|
20 | 51 | -- Ingredient management |
21 | | -CALL insert_responsibility('can_create_ingredient', 'Allows the addition of new ingredients to the database.'); |
22 | | -CALL insert_responsibility('can_edit_ingredient', 'Grants permission to modify existing ingredient details.'); |
23 | | -CALL insert_responsibility('can_delete_ingredient', 'Allows the removal of ingredients from the database.'); |
| 52 | +CALL insert_responsibility( |
| 53 | + 'can_create_ingredient', |
| 54 | + 'Allows the addition of new ingredients to the database.' |
| 55 | +); |
| 56 | +CALL insert_responsibility( |
| 57 | + 'can_edit_ingredient', |
| 58 | + 'Grants permission to modify existing ingredient details.' |
| 59 | +); |
| 60 | +CALL insert_responsibility( |
| 61 | + 'can_delete_ingredient', |
| 62 | + 'Allows the removal of ingredients from the database.' |
| 63 | +); |
24 | 64 |
|
25 | 65 | -- Media management |
26 | | -CALL insert_responsibility('can_upload_picture', 'Enables users to upload pictures to the system.'); |
27 | | -CALL insert_responsibility('can_delete_picture', 'Grants the ability to remove pictures from the system.'); |
| 66 | +CALL insert_responsibility( |
| 67 | + 'can_upload_picture', |
| 68 | + 'Enables users to upload pictures to the system.' |
| 69 | +); |
| 70 | +CALL insert_responsibility( |
| 71 | + 'can_delete_picture', |
| 72 | + 'Grants the ability to remove pictures from the system.' |
| 73 | +); |
28 | 74 |
|
29 | 75 | -- Moderation |
30 | | -CALL insert_responsibility('can_review_flagged_content', 'Allows reviewing and managing content flagged as inappropriate.'); |
31 | | -CALL insert_responsibility('can_suspend_user_account', 'Grants the ability to temporarily suspend a user’s account.'); |
32 | | -CALL insert_responsibility('can_ban_user_account', 'Enables the banning of user accounts permanently.'); |
| 76 | +CALL insert_responsibility( |
| 77 | + 'can_review_flagged_content', |
| 78 | + 'Allows reviewing and managing content flagged as inappropriate.' |
| 79 | +); |
| 80 | +CALL insert_responsibility( |
| 81 | + 'can_suspend_user_account', |
| 82 | + 'Grants the ability to temporarily suspend a user’s account.' |
| 83 | +); |
| 84 | +CALL insert_responsibility( |
| 85 | + 'can_ban_user_account', |
| 86 | + 'Enables the banning of user accounts permanently.' |
| 87 | +); |
33 | 88 |
|
34 | 89 | -- Person management |
35 | | -CALL insert_responsibility('can_manage_any_person_profile', 'Grants access to edit profiles of any user in the system.'); |
36 | | -CALL insert_responsibility('can_delete_any_person_account', 'Allows the permanent removal of any user account.'); |
| 90 | +CALL insert_responsibility( |
| 91 | + 'can_manage_any_person_profile', |
| 92 | + 'Grants access to edit profiles of any user in the system.' |
| 93 | +); |
| 94 | +CALL insert_responsibility( |
| 95 | + 'can_delete_any_person_account', |
| 96 | + 'Allows the permanent removal of any user account.' |
| 97 | +); |
37 | 98 |
|
38 | 99 | -- Recipe management |
39 | | -CALL insert_responsibility('can_create_recipe', 'Allows users to create and submit new recipes.'); |
40 | | -CALL insert_responsibility('can_edit_own_recipe', 'Grants users the ability to edit their own recipes.'); |
41 | | -CALL insert_responsibility('can_edit_any_recipe', 'Allows editing any recipe in the system.'); |
42 | | -CALL insert_responsibility('can_delete_own_recipe', 'Enables users to delete their own recipes.'); |
43 | | -CALL insert_responsibility('can_delete_any_recipe', 'Grants the ability to remove any recipe from the system.'); |
44 | | -CALL insert_responsibility('can_publish_recipe', 'Allows the publication of recipes to make them publicly visible.'); |
45 | | -CALL insert_responsibility('can_review_recipe', 'Grants permission to review recipes for approval or feedback.'); |
| 100 | +CALL insert_responsibility( |
| 101 | + 'can_create_recipe', |
| 102 | + 'Allows users to create and submit new recipes.' |
| 103 | +); |
| 104 | +CALL insert_responsibility( |
| 105 | + 'can_edit_own_recipe', |
| 106 | + 'Grants users the ability to edit their own recipes.' |
| 107 | +); |
| 108 | +CALL insert_responsibility( |
| 109 | + 'can_edit_any_recipe', |
| 110 | + 'Allows editing any recipe in the system.' |
| 111 | +); |
| 112 | +CALL insert_responsibility( |
| 113 | + 'can_delete_own_recipe', |
| 114 | + 'Enables users to delete their own recipes.' |
| 115 | +); |
| 116 | +CALL insert_responsibility( |
| 117 | + 'can_delete_any_recipe', |
| 118 | + 'Grants the ability to remove any recipe from the system.' |
| 119 | +); |
| 120 | +CALL insert_responsibility( |
| 121 | + 'can_publish_recipe', |
| 122 | + 'Allows the publication of recipes to make them publicly visible.' |
| 123 | +); |
| 124 | +CALL insert_responsibility( |
| 125 | + 'can_review_recipe', |
| 126 | + 'Grants permission to review recipes for approval or feedback.' |
| 127 | +); |
46 | 128 |
|
47 | 129 | -- Tag management |
48 | | -CALL insert_responsibility('can_create_tag', 'Allows the creation of new tags for categorizing content.'); |
49 | | -CALL insert_responsibility('can_edit_tag', 'Grants the ability to edit existing tags.'); |
50 | | -CALL insert_responsibility('can_delete_tag', 'Allows the removal of tags from the database.'); |
| 130 | +CALL insert_responsibility( |
| 131 | + 'can_create_tag', |
| 132 | + 'Allows the creation of new tags for categorizing content.' |
| 133 | +); |
| 134 | +CALL insert_responsibility( |
| 135 | + 'can_edit_tag', |
| 136 | + 'Grants the ability to edit existing tags.' |
| 137 | +); |
| 138 | +CALL insert_responsibility( |
| 139 | + 'can_delete_tag', |
| 140 | + 'Allows the removal of tags from the database.' |
| 141 | +); |
51 | 142 |
|
52 | 143 | -- Translation management |
53 | | -CALL insert_responsibility('can_add_translation', 'Enables the addition of new translations for system content.'); |
54 | | -CALL insert_responsibility('can_edit_translation', 'Grants permission to modify existing translations.'); |
55 | | -CALL insert_responsibility('can_delete_translation', 'Allows the deletion of translations from the database.'); |
| 144 | +CALL insert_responsibility( |
| 145 | + 'can_add_translation', |
| 146 | + 'Enables the addition of new translations for system content.' |
| 147 | +); |
| 148 | +CALL insert_responsibility( |
| 149 | + 'can_edit_translation', |
| 150 | + 'Grants permission to modify existing translations.' |
| 151 | +); |
| 152 | +CALL insert_responsibility( |
| 153 | + 'can_delete_translation', |
| 154 | + 'Allows the deletion of translations from the database.' |
| 155 | +); |
0 commit comments