@@ -88,7 +88,6 @@ export type RbacSubject =
8888 userId : string ;
8989 client ?: string ;
9090 // The environment the token was signed for, when it carries the claim.
91- // Carried on the subject so an authorization path can't lose it.
9291 environmentId ?: string ;
9392 organizationId : string ;
9493 projectId ?: string ;
@@ -399,10 +398,8 @@ export type UserActorAuthResult =
399398 | {
400399 ok : true ;
401400 userId : string ;
402- // The verified claims, so the caller gets the token's environment scope
403- // with the identity instead of re-deriving it. Optional only because a
404- // plugin built against an older contract can't return it — a host that
405- // enforces the environment claim must fail closed on its absence.
401+ // Optional only for plugins built against an older contract: a host enforcing the
402+ // environment claim must fail closed when it is absent.
406403 claims ?: UserActorClaims ;
407404 subject : RbacSubject ;
408405 ability : RbacAbility ;
@@ -453,9 +450,8 @@ export interface RoleBaseAccessController {
453450 // user: floor = the user's role in the target org (rejects non-members,
454451 // like authenticatePat), cap = the token's optional scope cap.
455452 //
456- // No plugin installed → the fallback verifies the token and builds the
457- // ability from the token's own cap (read-only when it declares none). A
458- // delegated token never gets the blanket ability the fallback gives a PAT.
453+ // No plugin installed → the fallback builds the ability from the token's own cap
454+ // (read-only when it declares none), never the blanket ability it gives a PAT.
459455 authenticateUserActor (
460456 request : Request ,
461457 context : { organizationId ?: string ; projectId ?: string }
0 commit comments