{"record":{"id":"d3033fd9aa270643","repo":"Dokploy/dokploy","slug":"forbidden-d3033f","errorCode":"FORBIDDEN","errorMessage":"Valid enterprise license required","messagePattern":"Valid enterprise license required","errorType":"exception","errorClass":"TRPCError","httpStatus":403,"severity":"error","filePath":"apps/dokploy/server/api/routers/git-provider.ts","lineNumber":118,"sourceCode":"\t\t\t}\n\n\t\t\tawait audit(ctx, {\n\t\t\t\taction: \"update\",\n\t\t\t\tresourceType: \"gitProvider\",\n\t\t\t\tresourceId: provider.gitProviderId,\n\t\t\t\tresourceName: provider.name ?? provider.gitProviderId,\n\t\t\t});\n\n\t\t\treturn await updateGitProvider(input.gitProviderId, {\n\t\t\t\tsharedWithOrganization: input.sharedWithOrganization,\n\t\t\t});\n\t\t}),\n\n\tallForPermissions: withPermission(\"member\", \"update\")\n\t\t.use(async ({ ctx, next }) => {\n\t\t\tconst licensed = await hasValidLicense(ctx.session.activeOrganizationId);\n\t\t\tif (!licensed) {\n\t\t\t\tthrow new TRPCError({\n\t\t\t\t\tcode: \"FORBIDDEN\",\n\t\t\t\t\tmessage: \"Valid enterprise license required\",\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn next();\n\t\t})\n\t\t.query(async ({ ctx }) => {\n\t\t\treturn await db.query.gitProvider.findMany({\n\t\t\t\tcolumns: {\n\t\t\t\t\tgitProviderId: true,\n\t\t\t\t\tname: true,\n\t\t\t\t\tproviderType: true,\n\t\t\t\t},\n\t\t\t\torderBy: desc(gitProvider.createdAt),\n\t\t\t\twhere: eq(gitProvider.organizationId, ctx.session.activeOrganizationId),\n\t\t\t});\n\t\t}),\n","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/Dokploy/dokploy/blob/546686ea3587f12ec5652217dedd9f7960fb6d15/apps/dokploy/server/api/routers/git-provider.ts#L100-L136","documentation":"The allForPermissions query is gated by an enterprise license check: hasValidLicense(activeOrganizationId) must return true. This endpoint (listing git providers for permission assignment) is a paid feature; without a valid license the middleware short-circuits with FORBIDDEN before the resolver runs.","triggerScenarios":"Calling the allForPermissions query on a self-hosted Dokploy without a purchased/active enterprise license, or with an expired license key for the active organization.","commonSituations":"Self-hosted community edition users discovering paid endpoints; expired license subscription; license key configured for a different organization.","solutions":["Purchase/renew a Dokploy enterprise license for the organization","Verify the license key is correctly configured and active in instance settings","If you don't need permission features, use the regular gitProvider.list endpoint instead"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const licensed = await trpc.license.hasValidLicense.query();\nif (!licensed) throw new Error('enterprise license required for permission features');","typeGuard":"function isLicenseRequired(e: unknown): boolean {\n  return e instanceof TRPCClientError && e.data?.code === 'FORBIDDEN' && /license required/.test(e.message);\n}","tryCatchPattern":null,"preventionTips":["Gate enterprise endpoints behind a license check in the UI","Renew licenses before expiry; use free alternatives for basic listing"],"tags":["dokploy","git-provider","trpc","licensing","enterprise"],"backgroundTag":"license-required","analyzedSha":"546686ea3587f12ec5652217dedd9f7960fb6d15","analyzedAt":"2026-08-27T05:18:58.095Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}