Skip to content

fix(server): align organization access control type#296

Merged
siisee11 merged 1 commit into
mainfrom
codex/fix-auth-ac-type
Jun 26, 2026
Merged

fix(server): align organization access control type#296
siisee11 merged 1 commit into
mainfrom
codex/fix-auth-ac-type

Conversation

@siisee11

Copy link
Copy Markdown
Contributor

One-Line Summary

OneQuery auth typechecks cleanly when consumed from Velen’s workspace type graph.

User-Facing Changes

  • No runtime behavior changes.
  • Velen can update its OneQuery submodule without @velen/web:typecheck failing on organization({ ac }) type compatibility.

Why This Changed

Velen typechecks vendored OneQuery source through a different workspace graph than OneQuery’s own CI. The precise createAccessControl(...) generic is accepted by OneQuery directly, but Velen’s fresh affected typecheck reported it as incompatible with Better Auth’s plugin option shape.

How It Changed

  • Derives the expected ac option type from Parameters<typeof organization>[0].
  • Casts the existing organizationAccessControl to that option type before passing it to organization(...).
  • Keeps the runtime access-control object unchanged.

Bug Fixes

  • Fixes Velen PR CI failing in @velen/web:typecheck on vendor/onequery/packages/server/src/auth.ts.

Verification

  • bunx turbo typecheck --json --filter=@onequery/server --filter=@velen/web --force
  • bun run --cwd vendor/onequery/packages/server vitest run src/services/data-source-query/validate-sql.test.ts
  • bun run format

Video / Screenshot (Optional)

  • N/A

@siisee11 siisee11 enabled auto-merge (squash) June 26, 2026 02:12
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 26, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
onequery-landing 01e5a08 Commit Preview URL

Branch Preview URL
Jun 26 2026, 02:18 AM

@siisee11 siisee11 force-pushed the codex/fix-auth-ac-type branch from 27675be to 01e5a08 Compare June 26, 2026 02:15
@siisee11 siisee11 merged commit 26471b9 into main Jun 26, 2026
8 checks passed
@siisee11 siisee11 deleted the codex/fix-auth-ac-type branch June 26, 2026 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant