FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Higher-level scopes are not returned when querying a more specific scope · Issue #457 · openedx/openedx-authz · GitHub

Higher-level scopes are not returned when querying a more specific scope #457

Description

Description

According to the designs, a scope also applies to the higher levels in the hierarchy. For example:

  • A specific course-level scope (course-v1:OpenedX+DemoX+DemoCourse) also applies at the organization level (course-v1:OpenedX+*) and at the platform level (course-v1:*).
  • An organization-level scope (course-v1:OpenedX+*) also applies at the platform level (course-v1:*).

Currently the response does not account for this inheritance in either case, so not all scopes that actually apply are being returned.

This also needs to be addressed for library scopes, not just course scopes — the same hierarchy logic (specific library → organization → platform) applies and should be handled consistently with courses.

Expected behavior

When querying any scope (course or library), the response should also include the scopes from all higher levels in the hierarchy that apply to it:

Course → should also include organization and platform.
Library → should also include organization and platform.
Organization → should also include platform.

Current behavior

Only the exact queried scope is returned, without propagating to higher levels in either case.

Context

This came up during a PR review comment

Proposed tasks

  • Define the logic to resolve the full scope hierarchy (platform → organization → course/library)
  • Update the response to include all applicable higher-level scopes, for any query level
  • Ensure the logic is applied consistently to both course scopes and library scopes
  • Add tests covering the different hierarchy levels (course→org→platform, library→org→platform, org→platform)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    willowReleased in Willow

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL