Skip to content

Refactor/membership api and permission checker - #4

Merged
tmetzl merged 4 commits into
mainfrom
refactor/membership-api-and-permission-checker
Jul 31, 2026
Merged

Refactor/membership api and permission checker#4
tmetzl merged 4 commits into
mainfrom
refactor/membership-api-and-permission-checker

Conversation

@tmetzl

@tmetzl tmetzl commented Jul 31, 2026

Copy link
Copy Markdown
Member

This pull request refactors and expands the role and permission management API, adding more granular methods for retrieving user roles and permissions at the hub, course, and term levels. It also updates and extends the test suite to cover these new methods and their expected behaviors.

Role and Permission API Enhancements

  • Added methods to PermissionChecker for retrieving roles and permissions at the hub, course, and term levels: get_roles_in_hub, get_permissions_in_hub, get_roles_in_course, get_permissions_in_course, get_roles_in_term and get_permissions_in_term. This enables more precise permission checks across different scopes. [1] [2]

Membership API Improvements

  • Updated the MembershipAPI constructor to accept an optional logger argument and pass it to the base class. [1] [2]

Test Suite Updates

  • Refactored and expanded tests to cover the new get_roles_in_course and get_roles_in_term methods, ensuring correct behavior for users with multiple roles and different role scopes.

These changes improve the flexibility and clarity of role and permission management throughout the codebase.

@tmetzl
tmetzl merged commit 3b79cbe into main Jul 31, 2026
5 checks passed
@tmetzl
tmetzl deleted the refactor/membership-api-and-permission-checker branch July 31, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant