You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This task focuses exclusively on the views and components related to Pages & Resources within the Authoring MFE. The goal is to ensure that users with these roles interact only with the permitted elements by applying “read-only” states for Course Auditors and enabling full management actions for Course Editors, as defined by the permission matrix.
Already in src/authz/constants.ts as COURSE_PERMISSIONS.MANAGE_PAGES_AND_RESOURCES and in src/authz/permissionHelpers.ts as getPagesAndResourcesPermissions(courseId).
Already fetched in pages-and-resources/PagesAndResources.tsx as canManagePagesAndResources; already used to compute isEditable and thread it into PagesAndResourcesContext.
Role matrix:
Course Auditor (manage ❌)
Course Editor (manage ✅).
PageSettingButton already reads isEditable from context. When !isEditable it currently renders a disabled arrow button instead of hiding it; the gear icon also still renders. Pattern: context (isEditable already resolved at the top — equivalent to prop pattern).
UI location 1 — Pages & Resources: hide settings icon in each card for Course Auditor
pages-and-resources/pages/PageSettingButton.jsx — return null when !isEditable (replaces the disabled-button branch and hides the gear). Placed after all hook calls to satisfy Rules of Hooks:
Activity
bra-i-am commentedon Jun 4, 2026
Refinement
https://www.figma.com/design/onU2END2OXaF7RRLWEHsZI/AuthZ---v2?node-id=9133-59237&t=OrmroEXprX0NyD7D-4
Permission used:
courses.manage_pages_and_resourcesAlready in
src/authz/constants.tsasCOURSE_PERMISSIONS.MANAGE_PAGES_AND_RESOURCESand insrc/authz/permissionHelpers.tsasgetPagesAndResourcesPermissions(courseId).Already fetched in
pages-and-resources/PagesAndResources.tsxascanManagePagesAndResources; already used to computeisEditableand thread it intoPagesAndResourcesContext.Role matrix:
PageSettingButtonalready readsisEditablefrom context. When!isEditableit currently renders a disabled arrow button instead of hiding it; the gear icon also still renders. Pattern: context (isEditablealready resolved at the top — equivalent to prop pattern).UI location 1 — Pages & Resources: hide settings icon in each card for Course Auditor
File:
pages-and-resources/pages/PageSettingButton.jsxpages-and-resources/pages/PageSettingButton.jsx— returnnullwhen!isEditable(replaces the disabled-button branch and hides the gear). Placed after all hook calls to satisfy Rules of Hooks:Testing implementation at https://github.com/eduNEXT/frontend-app-authoring/tree/bc/improve-pages-and-resources-permissions
Can view
Can manage