Skip to content

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

Closed
@emir01

Description

@emir01

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions