Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: Add OGJWTAuthProvider to handle admin users #1424

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

joshuadkitenge
Copy link
Contributor

Description

  • Implement OGJWTAuthProvider class with isAdmin method to check for admin privileges based on JWT's authorised_routes.
  • Add unit tests for isAdmin method covering scenarios with no token, empty authorised_routes, and token containing '/users GET' route.

Testing instructions

  • Review code
  • Check Actions build
  • Review changes to test coverage

Agile board tracking

closes #1423

- Implement OGJWTAuthProvider class with isAdmin method to check for admin privileges based on JWT's authorised_routes.
- Add unit tests for isAdmin method covering scenarios with no token, empty authorised_routes, and token containing '/users GET' route.
Copy link

codecov bot commented Dec 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.13%. Comparing base (cbfa974) to head (b28085f).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1424      +/-   ##
===========================================
+ Coverage    97.11%   97.13%   +0.01%     
===========================================
  Files           49       50       +1     
  Lines         1802     1814      +12     
  Branches       503      507       +4     
===========================================
+ Hits          1750     1762      +12     
  Misses          48       48              
  Partials         4        4              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add OGJWTAuthProvider to handle admin users
1 participant