Repository navigation
feat(admin): list every wallet for a wallet-admin - #594
Merged
dadiorchen merged 1 commit intoOct 1, 2026
Merged
Conversation
This was referenced Sep 24, 2026
Merged
The admin panel needs a directory of all wallets, and nothing served one.
GET /wallets always starts from the caller's wallet id, so scope=all means
"mine plus the ones I manage", and an admin account owns no wallet at all,
so it never even reaches the handler.
Adds GET /admin/wallets: an unscoped listing with the same limit, offset,
name, sort_by and order conventions, returning { total, query, wallets }.
Authorization is the keycloak wallet-admin role rather than wallet
ownership, which is why it needs its own middleware. JWTService now
returns the token's roles alongside its subject, reading both the realm
and per-client claims since either may carry the role.
No token counts on the rows: the list spans the whole table, and counting
per row would be one query per wallet.
Refs Greenstand/treetracker-admin-client#1239
samwel141
force-pushed
the
feat-admin-wallet-list-1239
branch
from
October 1, 2026 03:46
aa1b273 to
2d8e413
Compare
dadiorchen
approved these changes
Oct 1, 2026
|
🎉 This PR is included in version 1.44.0-keycloak.42 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Refs Greenstand/treetracker-admin-client#1239
Problem
The admin panel needs a directory of all wallets and nothing serves one.
GET /walletsalways starts from the caller's wallet id, soscope=allmeans"mine plus the ones I manage". An admin account owns no wallet, so it fails in
the auth middleware before reaching the handler.
Change
GET /admin/wallets: unscoped listing, samelimit,offset,name,sort_by,orderconventions, returning{ total, query, wallets }.Authorization is the keycloak
wallet-adminrole rather than wallet ownership,so it needs its own middleware.
JWTServicenow returns the token's roles withits subject, reading both the realm and per-client claims since either can carry
the role.
Verification
filter, pagination with an unpaginated total, 403 without the role, 401 with
no token.
wallet-admintoken, driven from the admin panel.
TypeErroron a missingAuthorizationheader instead of the real 401. Fixed, which is what makes the last case
testable.