fix(api): /v3/groups/manages parses list-format roles + cleanup stale app contracts - #577
Merged
Merged
Conversation
… app contracts
get_groups_manages expected roles as a dict but all groups store roles as a list of {name, services, permissions}. Now parses both formats with backward compat.
Also added /v3/app-contracts/cleanup endpoint to tombstone stale contracts where allowed_origin is a service name instead of a URL.
jacoby149
force-pushed
the
fix/groups-manages-roles-list-format
branch
from
August 12, 2026 05:45
9c1dffc to
77912a2
Compare
Apps cannot directly create or revoke app contracts — they must go through the popup consent flow. The /add and /revoke endpoints now check the Origin header against CORS_SERVICE_MANAGERS (auth.localhost, auth.dev.web10.app, auth.web10.app). Non-authenticator origins get 403.
jacoby149
force-pushed
the
fix/groups-manages-roles-list-format
branch
from
August 12, 2026 06:05
846e7f6 to
2e3c654
Compare
SDK: contractOnReady sends both ACR and GCR in one postMessage. Authenticator: pendingContracts holds both types, normalizeContracts parses ACR (allowed_origin+permissions) and GCR (app_origin+action+params). ConsentView: shows both types with distinct badges (access request / group request), GCR rows show action+group name+join policy. approveContract handles ACR (applyACR) and GCR (applyGCR → create group). approveAll handles both types. Legacy aliases kept for backward compat. Demos: stripped ensureAppContract — contracts now only created by authenticator after user consent.
jacoby149
force-pushed
the
fix/groups-manages-roles-list-format
branch
from
August 12, 2026 06:06
2e3c654 to
44ca587
Compare
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.
Two bugs fixed:
1. Groups not showing under 'Manage' tab —
get_groups_managesexpected roles stored as a dict ({"admin": {"permissions": [...]}}) but all groups store roles as a list ([{"name": "owner", "permissions": [...]}]). The.get(my_role)call silently returned{}on lists, so no groups ever matched. Now parses both formats with backward compat.2. Stale app contracts — Added
/v3/app-contracts/cleanupendpoint to tombstone contracts whereallowed_originis a service name (likeweb10-docs-hello-demo) instead of a URL. CallPOST /v3/app-contracts/cleanuponce to clean up your contracts list.320 tests pass (1 pre-existing failure unrelated).