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 Library Updates 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.
Yes, we should add a view permission to distinguish unauthorized users from Course Auditors.
Refinement
Acceptance criteria
A user with courses.view_library_updates (but without courses.manage_library_updates)
can open the Libraries page and the "Review Content Updates" tab.
On each update card, the Update (accept) and Ignore buttons are
disabled.
The preview modal's Accept changes / Ignore changes buttons (and the
locally-modified variants "Update to published library content" / "Keep course
content") are disabled for read-only users.
Hovering any disabled button shows the tooltip: Your role doesn't include permission to do this. Contact your org admin to request access
"Review Updates" (open preview) remains enabled for read-only users — viewing
is allowed.
A user without courses.view_library_updates still gets the existing PermissionDeniedAlert.
The course header "Libraries" menu link is shown to users with the view
permission (so view-only users can actually reach the page).
src/authz/permissionHelpers.ts: add canViewLibraryUpdates to getLibraryUpdatesPermissions() (view + manage, both course-scoped).
src/authz/permissionHelpers.test.ts: update the assertion for the new shape.
2. Read-only message
src/generic/messages.ts: add readOnlyTooltip with the exact copy above
(description included for translators). Shared so both the review tab and the
preview modal use the same string.
3. Page gating + read-only propagation
src/course-libraries/CourseLibraries.tsx:
gate on canViewLibraryUpdates (PermissionDeniedAlert otherwise);
compute readOnly = !canManageLibraryUpdates;
pass readOnly to ReviewTabContent.
src/header/hooks.tsx: show the "Libraries" content-menu link based on canViewLibraryUpdates instead of canManageLibraryUpdates.
4. Review tab card actions
src/course-libraries/ReviewTabContent.tsx:
thread readOnly through ReviewTabContent → ItemReviewList;
disable "Update" (LoadingButton) and "Ignore" buttons when read-only;
wrap the disabled buttons in OverlayTrigger/Tooltip (via a <span>, the
established pattern from src/course-unit/add-component/add-component-btn);
keep "Review Updates" enabled;
pass readOnly into the preview modal.
5. Preview modal
src/course-unit/preview-changes/index.tsx:
add optional readOnly prop (default false) so existing callers
(OutlineNode.tsx, LibraryReferenceCard.tsx, iframe wrapper) are unaffected;
disable + tooltip on "Accept changes"/"Ignore changes" and the locally
modified variants "Update to published library content"/"Keep course content".
6. Tests
src/course-libraries/CourseLibraries.test.tsx:
default permission mock includes canViewLibraryUpdates: true;
permission-denied test now keys off canViewLibraryUpdates: false;
new tests: read-only user sees disabled Update/Ignore with tooltip on hover;
preview modal buttons disabled with tooltip for read-only user.
src/course-unit/preview-changes/index.test.tsx: render modal directly with readOnly and assert disabled buttons + tooltip.
src/header/hooks.test.tsx: mocks switched to canViewLibraryUpdates.
I want to verify one last thing here and that is the out of sync Alert that is displayed in the course outline and libraries updates. There is not indication of what to do with it for Course Auditor in the Figma, and keep it does not cause any harm because it redirects to Library Updates page. However, I feel the message misleading for that specific role because it says "Review updates to accept or ignore changes" -> Action that cannot perform
I wonder if we would like to keep it as it is, or we should either hide the Alert or remove the review part of message for read only permissions.
@dcoa Do we use that message somewhere else? If not, I think we can change the last sentence to 'Review updates to see what changed' and it may be less misleading.
Activity
BryanttV commentedon Aug 10, 2026
Hi @dcoa, could you help me refine this issue? It seems to me that we'll also need to add a new read-only permission here.
cc @gviedma-aulasneo
dcoa commentedon Aug 11, 2026
Yes, we should add a view permission to distinguish unauthorized users from Course Auditors.
Refinement
Acceptance criteria
courses.view_library_updates(but withoutcourses.manage_library_updates)can open the Libraries page and the "Review Content Updates" tab.
disabled.
locally-modified variants "Update to published library content" / "Keep course
content") are disabled for read-only users.
Your role doesn't include permission to do this. Contact your org admin to request accessis allowed.
courses.view_library_updatesstill gets the existingPermissionDeniedAlert.permission (so view-only users can actually reach the page).
Implementation tasks (frontend-app-authoring)
1. Authz plumbing
src/authz/constants.ts: addVIEW_LIBRARY_UPDATES: 'courses.view_library_updates'.src/authz/permissionHelpers.ts: addcanViewLibraryUpdatestogetLibraryUpdatesPermissions()(view + manage, both course-scoped).src/authz/permissionHelpers.test.ts: update the assertion for the new shape.2. Read-only message
src/generic/messages.ts: addreadOnlyTooltipwith the exact copy above(description included for translators). Shared so both the review tab and the
preview modal use the same string.
3. Page gating + read-only propagation
src/course-libraries/CourseLibraries.tsx:canViewLibraryUpdates(PermissionDeniedAlert otherwise);readOnly = !canManageLibraryUpdates;readOnlytoReviewTabContent.src/header/hooks.tsx: show the "Libraries" content-menu link based oncanViewLibraryUpdatesinstead ofcanManageLibraryUpdates.4. Review tab card actions
src/course-libraries/ReviewTabContent.tsx:readOnlythroughReviewTabContent→ItemReviewList;LoadingButton) and "Ignore" buttons when read-only;OverlayTrigger/Tooltip(via a<span>, theestablished pattern from
src/course-unit/add-component/add-component-btn);readOnlyinto the preview modal.5. Preview modal
src/course-unit/preview-changes/index.tsx:readOnlyprop (defaultfalse) so existing callers(
OutlineNode.tsx,LibraryReferenceCard.tsx, iframe wrapper) are unaffected;modified variants "Update to published library content"/"Keep course content".
6. Tests
src/course-libraries/CourseLibraries.test.tsx:canViewLibraryUpdates: true;canViewLibraryUpdates: false;preview modal buttons disabled with tooltip for read-only user.
src/course-unit/preview-changes/index.test.tsx: render modal directly withreadOnlyand assert disabled buttons + tooltip.src/header/hooks.test.tsx: mocks switched tocanViewLibraryUpdates.dcoa commentedon Aug 25, 2026
I want to verify one last thing here and that is the out of sync Alert that is displayed in the course outline and libraries updates. There is not indication of what to do with it for Course Auditor in the Figma, and keep it does not cause any harm because it redirects to Library Updates page. However, I feel the message misleading for that specific role because it says "Review updates to accept or ignore changes" -> Action that cannot perform
I wonder if we would like to keep it as it is, or we should either hide the Alert or remove the review part of message for read only permissions.
@BryanttV @gviedma-aulasneo
gviedma-aulasneo commentedon Aug 27, 2026
@dcoa Do we use that message somewhere else? If not, I think we can change the last sentence to 'Review updates to see what changed' and it may be less misleading.