Skip to content

feat: add view permissions for advanced settings, certificates, group configurations, and library updates - #385

Merged
BryanttV merged 1 commit into
openedx:mainfrom
WGU-Open-edX:feat/view-advanced-settings-and-certificates
Aug 18, 2026
Merged

feat: add view permissions for advanced settings, certificates, group configurations, and library updates#385
BryanttV merged 1 commit into
openedx:mainfrom
WGU-Open-edX:feat/view-advanced-settings-and-certificates

Conversation

@wgu-taylor-payne

@wgu-taylor-payne wgu-taylor-payne commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Description

Add four new read-only view permissions for the Advanced Settings, Certificates, Group Configurations, and Library Updates pages:

  • courses.view_advanced_settings — allows viewing advanced settings without edit access
  • courses.view_certificates — allows viewing certificates without edit access
  • courses.view_group_configurations — allows viewing group configurations without edit access
  • courses.view_library_updates — allows viewing library updates without edit access

All four permissions are granted to all four course roles (Admin, Staff, Editor, Auditor). Previously, users without the corresponding manage_* permissions were completely blocked from even viewing these pages. The intended behavior (per #283) is read-only access for all course roles, with only Admin/Staff retaining write access (Editor also retains manage_group_configurations and manage_library_updates).

Changes

  • constants/permissions.py — Added COURSES_VIEW_ADVANCED_SETTINGS, COURSES_VIEW_CERTIFICATES, COURSES_VIEW_GROUP_CONFIGURATIONS, and COURSES_VIEW_LIBRARY_UPDATES permission constants
  • constants/roles.py — Added all four view permissions to all four course role permission lists
  • engine/config/authz.policy — Added 16 Casbin policy rules (4 permissions × 4 roles)
  • docs/concepts/core_roles_and_permissions/course_roles.rst — Updated permission descriptions and matrix table
  • Tests — Added test coverage verifying view/manage permission split (editor/auditor get view but not manage where applicable)
  • Version bump1.22.01.23.0 (minor: new backwards-compatible functionality)

Manual testing

  1. Assign a user the course_editor or course_auditor role on a course
  2. Verify is_user_allowed(user, 'courses.view_advanced_settings', course_scope) returns True
  3. Verify is_user_allowed(user, 'courses.manage_advanced_settings', course_scope) returns False
  4. Same pattern for view_certificates / manage_certificates
  5. For view_group_configurations: auditor gets view=True, manage=False; editor gets both=True
  6. For view_library_updates: auditor gets view=True, manage=False; editor gets both=True
  7. Repeat with course_staff and course_admin roles (should have all permissions)

Merge checklist:

  • Version bumped
  • Changelog record added
  • Documentation updated (not only docstrings)
  • Fixup commits are squashed away
  • Unit tests added/updated
  • Manual testing instructions provided
  • Noted any: Concerns, dependencies, migration issues, deadlines, tickets

Notes: This is purely additive — no migrations needed, no breaking changes. Users who previously had manage_* implicitly also get view_* since their roles receive both. Downstream enforcement changes in openedx-platform depend on this PR being merged and released first.

Related to #328, #329, #386, and #387.

AI Usage

Kiro was used in implementing this PR. I guided the process by defining the scope, confirming the approach (single PR, view/manage split pattern), and reviewing each step — Kiro researched the codebase, planned the implementation, generated the permission constants/roles/policies/docs, and ran the full test suite iteratively until all 1301 tests passed. I reviewed the generated code and tests, trimmed redundant test cases after discussing what was already covered by other test layers, and verified the changes end-to-end in a local Tutor environment by assigning users to all four course roles and confirming the correct allow/deny behavior.

@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U core contributor PR author is a Core Contributor (who may or may not have write access to this repo). labels Aug 11, 2026
@openedx-webhooks

openedx-webhooks commented Aug 11, 2026

Copy link
Copy Markdown

Thanks for the pull request, @wgu-taylor-payne!

This repository is currently maintained by @openedx/committers-openedx-authz.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@github-project-automation github-project-automation Bot moved this to Needs Triage in Contributions Aug 11, 2026
@mphilbrick211 mphilbrick211 added the mao-onboarding Reviewing this will help onboard devs from an Axim mission-aligned organization (MAO). label Aug 11, 2026
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Ready for Review in Contributions Aug 11, 2026
@mphilbrick211
mphilbrick211 requested a review from a team August 11, 2026 21:16
@wgu-taylor-payne
wgu-taylor-payne marked this pull request as draft August 12, 2026 15:12
@wgu-taylor-payne wgu-taylor-payne changed the title feat: add courses.view_advanced_settings and courses.view_certificates permissions feat: add view permissions for advanced settings, certificats, and group configurations Aug 12, 2026
@wgu-taylor-payne
wgu-taylor-payne force-pushed the feat/view-advanced-settings-and-certificates branch from 019cf47 to 5e77342 Compare August 13, 2026 16:27
@wgu-taylor-payne
wgu-taylor-payne marked this pull request as ready for review August 13, 2026 16:45
@BryanttV

Copy link
Copy Markdown
Contributor

Hi @wgu-taylor-payne, thanks for this! Could we also include this new permission in the PR? #386

… configurations, and library updates

Add four new read-only view permissions:
- courses.view_advanced_settings
- courses.view_certificates
- courses.view_group_configurations
- courses.view_library_updates

All four are granted to all four course roles (Admin, Staff, Editor, Auditor).
Previously, users without the corresponding manage_* permissions were completely
blocked from viewing these pages.

Closes openedx#328, Closes openedx#329, Closes openedx#386, Closes openedx#387
@wgu-taylor-payne
wgu-taylor-payne force-pushed the feat/view-advanced-settings-and-certificates branch from 5e77342 to 2f899c8 Compare August 13, 2026 17:48
@wgu-taylor-payne
wgu-taylor-payne marked this pull request as draft August 13, 2026 17:52
@wgu-taylor-payne
wgu-taylor-payne marked this pull request as ready for review August 13, 2026 17:55
@wgu-taylor-payne

Copy link
Copy Markdown
Contributor Author

Hi @wgu-taylor-payne, thanks for this! Could we also include this new permission in the PR? #386

@BryanttV I've added that permission. Thanks.

@BryanttV BryanttV left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this on my local, and it works as expected! All 4 course roles have the 4 new permissions. Thanks!

@wgu-taylor-payne wgu-taylor-payne changed the title feat: add view permissions for advanced settings, certificats, and group configurations feat: add view permissions for advanced settings, certificates, group configurations, and library updates Aug 17, 2026
@BryanttV
BryanttV merged commit e68de69 into openedx:main Aug 18, 2026
8 checks passed
@github-project-automation github-project-automation Bot moved this from Ready for Review to Done in Contributions Aug 18, 2026
@BryanttV BryanttV linked an issue Aug 18, 2026 that may be closed by this pull request
@BryanttV BryanttV linked an issue Aug 18, 2026 that may be closed by this pull request
@BryanttV BryanttV linked an issue Aug 18, 2026 that may be closed by this pull request
@BryanttV BryanttV linked an issue Aug 18, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core contributor PR author is a Core Contributor (who may or may not have write access to this repo). mao-onboarding Reviewing this will help onboard devs from an Axim mission-aligned organization (MAO). open-source-contribution PR author is not from Axim or 2U

Projects

Status: Done

4 participants