Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Integrating with Clerk recommends using @@ignore on User model, causing Access Policy Plugin to fail #840

Closed
emir01 opened this issue Nov 18, 2023 · 0 comments
Milestone

Comments

@emir01
Copy link

emir01 commented Nov 18, 2023

Description and expected behavior
The Clerk integration guide here specifies setting up the user model in the following way:

model User {
    id String @id
    @@ignore
}

This specifies using @@ignore which causes the User model to not be included in the Prisma client.

This however causes an issue with running zenstack generate as the Access Policy plugin cannot resolve the auth() model in policy rules (@@allow, @@deny )

The expected behaviour is to be able to use @@ignore, to avoid the User model in the prisma client. When we use Clerk we don't store the User information in the Db.

Screenshots

image

Environment (please complete the following information):

  • ZenStack version: "1.3.1"
  • Prisma version: "^5.6.0"
  • Database type: Postgresql (Supabase)

Additional context

Discord Discussion Thread: https://discord.com/channels/1035538056146595961/1068743295863369858/1175510739495174275

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants