Refactor/membership api and permission checker - #4
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
PermissionCheckerfor 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_termandget_permissions_in_term. This enables more precise permission checks across different scopes. [1] [2]Membership API Improvements
MembershipAPIconstructor to accept an optionalloggerargument and pass it to the base class. [1] [2]Test Suite Updates
get_roles_in_courseandget_roles_in_termmethods, 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.