fix(worker-auth): unify token checks and bind job environment

This commit is contained in:
Gabriel Brown committed 2026-07-10 17:06:33 -04:00
1 parent feb3723753
commit 020ffbfb23
6 files changed
+138 -37

No files matched your search

@@ -71,6 +71,7 @@ export const getRawEnvironmentForJobInternal = internalQuery({
handler: async (ctx, { jobId }) => {
const job = await ctx.db.get(jobId);
if (!job) return null;
if (!job.claimedBy) return null; // only a claimed job's env is exposed
const ownerId = job.ownerId;
const [user, settings, files] = await Promise.all([
ctx.db.get(ownerId),