Skip to content

Cannot create policies from template #79

Open
@0x113

Description

@0x113

Bug report

Describe the bug

I'm trying to add the "Enable insert for authenticated users only" to my table, but it fails with the message:

Please provide a SQL expression for the WITH CHECK statement

When I execute the same query in SQL Editor, it gives the following error:

Error: ERROR: 42601: zero-length delimited identifier at or near """" LINE 6: alter policy "" on "public"."stores" to authenticated with check (true);alter policy "" on "public"."stores" to authenticated rename to "Enable insert for authenticated users only" ^

The same flow works when the Supabase is deployed using docker-compose.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Create a table
  2. Try to add to it "Enable insert for authenticated users only" policy.
  3. The request will fail.

Expected behavior

The policy should be added without any errors.

Screenshots

image

If applicable, add screenshots to help explain your problem.

System information

  • OS: Deployed on a Kind cluster.
  • Browser: Chrome
  • Version of supabase-js: -
  • Version of Node.js: -

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions