File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import type { PrismaClient , RuntimeEnvironment } from "@trigger.dev/database" ;
2- // HostRbacController, not RoleBaseAccessController: the policy methods are
3- // optional on the plugin-facing contract, and `rbac` (LazyController) has
4- // already substituted the fail-closed defaults for any an installed plugin
5- // omits. Depending on the host surface keeps this call site guard-free.
62import type { HostRbacController } from "@trigger.dev/rbac" ;
73import { trail } from "agentcrumbs" ; // @crumbs
84import { customAlphabet } from "nanoid" ;
@@ -122,9 +118,6 @@ export async function createEnvironmentApiKey(
122118 userId : string ;
123119 name : string ;
124120 expiresAt ?: Date ;
125- // Required, and passed straight through to `prepareApiKeyPolicy` — callers
126- // name the access level rather than leaning on a default that would grant
127- // full access. Installs with no preset catalogue pass FULL_ACCESS_PRESET_ID.
128121 presetId : string ;
129122 taskIdentifiers ?: string [ ] ;
130123 } ,
Original file line number Diff line number Diff line change 11import { type RuntimeEnvironment } from "@trigger.dev/database" ;
2- // HostRbacController, not RoleBaseAccessController: the policy methods are
3- // optional on the plugin-facing contract, and `rbac` (LazyController) has
4- // already substituted the fail-closed defaults for any an installed plugin
5- // omits. Depending on the host surface keeps these call sites guard-free.
62import { scopesGrantFullAccess , type HostRbacController } from "@trigger.dev/rbac" ;
73import { type PrismaReplicaClient , $replica } from "~/db.server" ;
84import { type Project } from "~/models/project.server" ;
You can’t perform that action at this time.
0 commit comments