Skip to content

chore: pre-publish cleanup — group-permission fix, fetched-permissions docs, .NET 10 nits#1305

Merged
iammukeshm merged 3 commits into
mainfrom
chore/pre-publish-cleanup
Jun 19, 2026
Merged

chore: pre-publish cleanup — group-permission fix, fetched-permissions docs, .NET 10 nits#1305
iammukeshm merged 3 commits into
mainfrom
chore/pre-publish-cleanup

Conversation

@iammukeshm

Copy link
Copy Markdown
Member

Clears the working tree before the NuGet GA publish. Three independent, complete changes that had been sitting uncommitted — all verified by the full test suite (14 projects, ~1,790 tests green).

1. fix(identity) — group-derived roles confer permissions

UserPermissionService resolved permissions from a user's direct roles only, but the JWT (IdentityService.AddRoleClaimsAsync) already unions direct + group-derived roles. A user whose only role came via a UserGroup saw the role in their token yet failed every .RequirePermission() gate, and GET /identity/permissions under-reported. Now unions roles via UserGroups → GroupRoles (query-only, no migration). Covered by new GroupRolePermissionTests (integration) + AuthorizationMetadataTests (architecture).

2. docs(frontend) — dashboard permissions are fetched, not in the JWT

The dashboard JWT carries only role names; auth-context.tsx fetches the permission list from GET /api/v1/identity/permissions (permissionsHydrated flag, cached). Updates the agent rules/skills and the Playwright auth-seed helper to match shipped behavior (permissions in the fake JWT are inert; gated specs mock the endpoint).

3. chore — .NET 10 housekeeping

  • Drop dotnet workload install aspire (devcontainer + template README) — .NET 10 ships Aspire as NuGet packages.
  • DbMigrator is a console Generic Host → its env gate reads DOTNET_ENVIRONMENT, not ASPNETCORE_ENVIRONMENT; fix the seed-demo refusal message + docs.
  • fsh new example used the non-existent --no-git--no-frontend.
  • CONTRIBUTING: Node 20+ to match both READMEs.

Several of these files ship inside the NuGet packages (template README, DbMigrator docs, CLI example, UserPermissionService), so they should land before the GA packages are regenerated.

🤖 Generated with Claude Code

iammukeshm and others added 3 commits June 20, 2026 03:42
…laims

UserPermissionService computed the effective permission set from a user's
DIRECT roles only, while IdentityService.AddRoleClaimsAsync already unions
direct + group-derived roles when minting the JWT. Result: a user whose only
role comes via a UserGroup saw the role in their token but failed every
.RequirePermission() gate (and GET /identity/permissions under-reported).

Union direct roles with roles reachable via UserGroups -> GroupRoles before
resolving permissions (group mutations already invalidate this cache entry).
Query-only — no schema change.

Tests:
- GroupRolePermissionTests (integration): a group-only user's own-permissions
  include the group role's grants and pass the gated endpoint.
- AuthorizationMetadataTests (architecture): RequiredPermissionAttribute exists
  exactly once implementing IRequiredPermissionMetadata, so gates can't silently
  fail open via a duplicate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…he JWT

The dashboard JWT carries only role names; auth-context.tsx fetches the
effective permission list from GET /api/v1/identity/permissions, caches it, and
exposes permissionsHydrated. Update the agent rules/skills to match the shipped
behavior, and align the Playwright auth-seed helper: permissions in the fake JWT
are inert (gated specs mock GET /identity/permissions instead).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Drop `dotnet workload install aspire` (devcontainer postCreate + template
  README prerequisite): .NET 10 ships Aspire as NuGet packages, no workload.
- DbMigrator is a console Generic Host, so its env gate reads DOTNET_ENVIRONMENT,
  not ASPNETCORE_ENVIRONMENT — fix the seed-demo refusal message + docs that told
  users to set the wrong variable.
- fsh CLI: the `new` example used the non-existent `--no-git`; use `--no-frontend`.
- CONTRIBUTING: Node.js 20+ to match both READMEs (was 22+).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@iammukeshm iammukeshm merged commit 44412b2 into main Jun 19, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant