|
1 | | -import { PermissionMetadata, ResourceMetadata, RoleMetadata } from 'types'; |
| 1 | +import { PermissionMetadata, ResourceMetadata } from 'types'; |
2 | 2 |
|
3 | 3 | export const CONTENT_LIBRARY_PERMISSIONS = { |
4 | 4 | DELETE_LIBRARY: 'content_libraries.delete_library', |
@@ -62,23 +62,6 @@ export const CONTENT_COURSE_PERMISSIONS = { |
62 | 62 | VIEW_COURSE_GLOBAL_STAFF_SUPER_ADMINS: 'courses.view_global_staff_and_superadmins', |
63 | 63 | }; |
64 | 64 |
|
65 | | -// Note: this information will eventually come from the backend API |
66 | | -// but for the MVP we decided to manage it in the frontend |
67 | | -export const libraryRolesMetadata: RoleMetadata[] = [ |
68 | | - { |
69 | | - role: 'library_admin', name: 'Library Admin', description: 'The Library Admin has full control over the library, including managing users, modifying content, and handling publishing workflows. They ensure content is properly maintained and accessible as needed.', contextType: 'library', |
70 | | - }, |
71 | | - { |
72 | | - role: 'library_author', name: 'Library Author', description: 'The Library Author is responsible for creating, editing, and publishing content within a library. They can manage tags and collections but cannot delete libraries or manage users.', contextType: 'library', |
73 | | - }, |
74 | | - { |
75 | | - role: 'library_contributor', name: 'Library Contributor', description: 'The Library Contributor can create and edit content within a library but cannot publish it. They support the authoring process while leaving final publishing to Authors or Admins.', contextType: 'library', |
76 | | - }, |
77 | | - { |
78 | | - role: 'library_user', name: 'Library User', description: 'The Library User can view and reuse content but cannot edit or delete any resource.', contextType: 'library', |
79 | | - }, |
80 | | -]; |
81 | | - |
82 | 65 | export const libraryResourceTypes: ResourceMetadata[] = [ |
83 | 66 | { key: 'library', label: 'Library', description: 'Permissions related to the library as a whole.' }, |
84 | 67 | { key: 'library_content', label: 'Content', description: 'Permissions to create, edit, delete, and publish individual content items within the library.' }, |
@@ -160,51 +143,6 @@ export const DJANGO_MANAGED_ROLES = ['django.superuser', 'django.globalstaff']; |
160 | 143 | export const TABLE_DEFAULT_PAGE_SIZE = 10; |
161 | 144 |
|
162 | 145 | export const DEFAULT_FILTER_PAGE_SIZE = 5; |
163 | | -// Course Permission Keys |
164 | | -export const COURSE_PERMISSIONS = { |
165 | | - // View permissions (Course Auditor) |
166 | | - VIEW_COURSE: 'courses.view_course', |
167 | | - VIEW_COURSE_UPDATES: 'courses.view_course_updates', |
168 | | - VIEW_PAGES_AND_RESOURCES: 'courses.view_pages_and_resources', |
169 | | - VIEW_FILES: 'courses.view_files', |
170 | | - VIEW_GRADING_SETTINGS: 'courses.view_grading_settings', |
171 | | - VIEW_CHECKLISTS: 'courses.view_checklists', |
172 | | - VIEW_COURSE_TEAM: 'courses.view_course_team', |
173 | | - VIEW_SCHEDULE_AND_DETAILS: 'courses.view_schedule_and_details', |
174 | | - |
175 | | - // Edit permissions (Course Editor) |
176 | | - EDIT_COURSE_CONTENT: 'courses.edit_course_content', |
177 | | - MANAGE_LIBRARY_UPDATES: 'courses.manage_library_updates', |
178 | | - MANAGE_COURSE_UPDATES: 'courses.manage_course_updates', |
179 | | - MANAGE_PAGES_AND_RESOURCES: 'courses.manage_pages_and_resources', |
180 | | - CREATE_FILES: 'courses.create_files', |
181 | | - EDIT_FILES: 'courses.edit_files', |
182 | | - EDIT_GRADING_SETTINGS: 'courses.edit_grading_settings', |
183 | | - MANAGE_GROUP_CONFIGURATIONS: 'courses.manage_group_configurations', |
184 | | - EDIT_DETAILS: 'courses.edit_details', |
185 | | - MANAGE_TAGS: 'courses.manage_tags', |
186 | | - |
187 | | - // Publish & lifecycle permissions (Course Staff) |
188 | | - PUBLISH_COURSE_CONTENT: 'courses.publish_course_content', |
189 | | - DELETE_FILES: 'courses.delete_files', |
190 | | - EDIT_SCHEDULE: 'courses.edit_schedule', |
191 | | - MANAGE_ADVANCED_SETTINGS: 'courses.manage_advanced_settings', |
192 | | - MANAGE_CERTIFICATES: 'courses.manage_certificates', |
193 | | - IMPORT_COURSE: 'courses.import_course', |
194 | | - EXPORT_COURSE: 'courses.export_course', |
195 | | - EXPORT_TAGS: 'courses.export_tags', |
196 | | - |
197 | | - // Team & taxonomy permissions (Course Admin only) |
198 | | - MANAGE_COURSE_TEAM: 'courses.manage_course_team', |
199 | | - MANAGE_TAXONOMIES: 'courses.manage_taxonomies', |
200 | | - |
201 | | - // Legacy role permissions |
202 | | - LEGACY_STAFF_ROLE_PERMISSIONS: 'courses.legacy_staff_role_permissions', |
203 | | - LEGACY_INSTRUCTOR_ROLE_PERMISSIONS: 'courses.legacy_instructor_role_permissions', |
204 | | - LEGACY_LIMITED_STAFF_ROLE_PERMISSIONS: 'courses.legacy_limited_staff_role_permissions', |
205 | | - LEGACY_DATA_RESEARCHER_PERMISSIONS: 'courses.legacy_data_researcher_permissions', |
206 | | - LEGACY_BETA_TESTER_PERMISSIONS: 'courses.legacy_beta_tester_permissions', |
207 | | -}; |
208 | 146 |
|
209 | 147 | // Resource Type Definitions |
210 | 148 | export const RESOURCE_TYPES = { |
|
0 commit comments