You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce the OGJWTAuthProvider class to streamline handling of admin users in the OG. This class will provide the isAdmin method to verify if a user has administrative privileges based on the authorised_routes in their JWT.
Tasks
Implement the OGJWTAuthProvider class, inheriting from JWTAuthProvider, and add the isAdmin method.
Ensure isAdmin checks the token's authorised_routes for the presence of '/users GET'.
Write unit tests for the isAdmin method to cover:
No token in localStorage.
Token with no or empty authorised_routes.
Token containing the '/users GET' route.
Acceptance Criteria
OGJWTAuthProvider correctly identifies admin status through isAdmin.
Unit tests validate all possible scenarios for isAdmin.
The text was updated successfully, but these errors were encountered:
Description
Introduce the
OGJWTAuthProvider
class to streamline handling of admin users in the OG. This class will provide theisAdmin
method to verify if a user has administrative privileges based on theauthorised_routes
in their JWT.Tasks
OGJWTAuthProvider
class, inheriting fromJWTAuthProvider
, and add theisAdmin
method.isAdmin
checks the token'sauthorised_routes
for the presence of'/users GET'
.isAdmin
method to cover:localStorage
.authorised_routes
.'/users GET'
route.Acceptance Criteria
OGJWTAuthProvider
correctly identifies admin status throughisAdmin
.isAdmin
.The text was updated successfully, but these errors were encountered: