انتقل إلى المحتوى الرئيسي

Function: actsForOrganization()

actsForOrganization(route): route is RouteDefinition & { permission: "subject.create" | "subject.read" | "person.create" | "person.read" | "grant.create" | "grant.read" | "grant.revoke" | "accreditation.apply" | "accreditation.admit" | "accreditation.publish" | "accreditation.read" | "entity-statement.read" | "identifier.create" | "identifier.read" | "identifier.publish" | "identifier.update" }

Defined in: packages/contracts/src/routes.ts:42

Whether a route acts for an organization, which is what makes the gateway resolve a TenantActor through principal.resolve and pass Oktoid-Acting-For along (D1.8). Derived from the route's permission and from nothing else, so the guard's bypass for the caller's own view is a property of the declaration, not of a path it compares.

Parameters​

route​

RouteDefinition

A route definition.

Returns​

route is RouteDefinition & { permission: "subject.create" | "subject.read" | "person.create" | "person.read" | "grant.create" | "grant.read" | "grant.revoke" | "accreditation.apply" | "accreditation.admit" | "accreditation.publish" | "accreditation.read" | "entity-statement.read" | "identifier.create" | "identifier.read" | "identifier.publish" | "identifier.update" }

false when the route's permission is 'none'.