Repository navigation
Task - Course updates and handouts #315
Description
Activity
Refinement
Permission used:
courses.manage_course_updates/courses.view_course_updates.
Pattern: sameuseCourseUserPermissionshook — already resolved inCourseUpdates.tsxascanViewCourseUpdatesandcanManageCourseUpdates.
UI location 1 — Course Updates page (view-only banner + hidden empty-state button for Course Auditor)
Files:
course-updates/messages.ts→course-updates/CourseUpdates.tsxcourse-updates/messages.ts— add view-only alert message:viewOnlyAlert: { id: 'course-authoring.course-updates.alert.view-only', defaultMessage: 'You have view-only access to this page. Contact your organization admin to request permissions.', description: 'Alert shown to users who can view but cannot manage course updates', },
course-updates/CourseUpdates.tsx— addAlertto paragon imports, addLockicon, show view-only banner betweenSubHeaderand the updates section, and gate the empty-state button:// paragon import — add Alert import { ActionRow, Alert, Button, Container, Layout, } from '@openedx/paragon'; // icons import — add Lock import { Add as AddIcon, ErrorOutline as ErrorIcon, Lock as LockIcon } from '@openedx/paragon/icons'; ... <SubHeader ... /> {canViewCourseUpdates && !canManageCourseUpdates && ( <Alert variant="info" icon={LockIcon}> {intl.formatMessage(messages.viewOnlyAlert)} </Alert> )} <section className="updates-section"> ... {!courseUpdates.length && ( <ActionRow> <ActionRow.Spacer /> <span className="small mr-2"> {intl.formatMessage(messages.noCourseUpdates)} </span> {canManageCourseUpdates && ( <Button variant="primary" iconBefore={AddIcon} size="sm" onClick={() => handleOpenUpdateForm(REQUEST_TYPES.add_new_update)} disabled={isUpdateFormOpen || errors.loadingUpdates} > {intl.formatMessage(messages.firstUpdateButton)} </Button> )} <ActionRow.Spacer /> </ActionRow> )}
Testing implementation at https://github.com/eduNEXT/frontend-app-authoring/tree/bc/change-course-update-view
Reacted by María Fernanda MagallanesMost of the implementation has been done previously. I am going to open a same PR for those that have the View Only Alert including this one.
- moved this from Ready for Review to Done in RBAC AuthZ Board
on Aug 24, 2026
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone