Follow-up to #1087 and tenant-registry #160.
**Problem (stage, Sharang's workspace, entitlement expired)**
- tenant-registry #160 now sends `branding` even when `allowed` is false.
- But Prüfwerk's entitlement gate answered `403 not_entitled` to `GET /api/v1/branding`, as to every request of a refused workspace.
- The dashboard's `fetch_branding` failed, so there was no frame and no logo, exactly on the screens that tell the workspace it's expired.
**Fix**
- The gate (`require_entitlement`) lets two requests through when the registry answered for the tenant but refused it (expired, `member_blocked`):
- `GET /api/v1/branding`
- `GET /api/v1/branding/logo`
- The tenant context is marked `Restricted` (read-only).
- Everything else stays refused, including `POST /api/v1/branding/ack`.
- An unreachable registry still gives 503, as before.
**Test**
- `tests/member_blocked.rs` gets `a_refused_workspace_still_reads_its_branding_and_nothing_else`:
- an expired workspace reads branding and logo (200);
- `/r` and the ack stay 403;
- a blocked member sees the frame too.
- The existing block and unreachable-registry tests pass. Clippy is clean.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
An expired or blocked workspace got 403 not_entitled on every request,
the branding included, so its frame and logo vanished exactly on the
screens that tell it why. The registry now sends `branding` for every
known tenant (tenant-registry #160); the entitlement gate lets GET
/api/v1/branding and /api/v1/branding/logo through for a tenant the
registry answered for, read-only. The acknowledgement and everything
else stay refused.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang
merged commit a2a91efaad into main2026-12-01 15:34:46 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Follow-up to #1087 and tenant-registry #160.
Problem (stage, Sharang's workspace, entitlement expired)
brandingeven whenallowedis false.403 not_entitledtoGET /api/v1/branding, as to every request of a refused workspace.fetch_brandingfailed, so there was no frame and no logo, exactly on the screens that tell the workspace it's expired.Fix
require_entitlement) lets two requests through when the registry answered for the tenant but refused it (expired,member_blocked):GET /api/v1/brandingGET /api/v1/branding/logoRestricted(read-only).POST /api/v1/branding/ack.Test
tests/member_blocked.rsgetsa_refused_workspace_still_reads_its_branding_and_nothing_else:/rand the ack stay 403;🤖 Generated with Claude Code
https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9