Skip to content

Task - implement pages and resources #321

Description

@MaferMazu

Description

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.

Permission Matrix

Category Permission Course Editor Course Auditor
Pages & Resources courses.view_pages_and_resources ✅ ✅
courses.manage_pages_and_resources ✅ ❌

Approved Design: Figma

Activity

  1. bra-i-am commented on Jun 4, 2026

    @bra-i-am

    Refinement

    https://www.figma.com/design/onU2END2OXaF7RRLWEHsZI/AuthZ---v2?node-id=9133-59237&t=OrmroEXprX0NyD7D-4

    Permission used:

    • courses.manage_pages_and_resources

    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

    File: pages-and-resources/pages/PageSettingButton.jsx

    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:

      const canConfigureOrEnable = allowedOperations?.configure || allowedOperations?.enable;
    
      if (!isEditable) {
        return null;
      }
    
      if (determineLinkDestination) {

    Testing implementation at https://github.com/eduNEXT/frontend-app-authoring/tree/bc/improve-pages-and-resources-permissions

    Can view

    Image

    Can manage

    Image
  2. moved this to Ready for Development in RBAC AuthZ Boardon Aug 4, 2026
  3. moved this from Ready for Development to Ready for Review in RBAC AuthZ Boardon Aug 13, 2026
  4. moved this from Ready for Review to Done in RBAC AuthZ Boardon Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions