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

CREATE ROLE error with NOSUPERUSER on v 1.164.1 #2224

Open
beagreenlite opened this issue Apr 30, 2024 · 1 comment
Open

CREATE ROLE error with NOSUPERUSER on v 1.164.1 #2224

beagreenlite opened this issue Apr 30, 2024 · 1 comment

Comments

@beagreenlite
Copy link

beagreenlite commented Apr 30, 2024

Describe the bug
Permission denied to create role on CREATE ROLE "<user>" WITH LOGIN NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;
To Reproduce

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

  1. supabase start
  2. Go to your db http://localhost:54323
  3. CREATE ROLE "test_user" WITH LOGIN NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;
  4. Get error
Error: ERROR: 42501: permission denied to create role DETAIL: Only roles with the SUPERUSER attribute may create roles with the SUPERUSER attribute. CONTEXT: SQL statement "CREATE ROLE "test_user" WITH LOGIN NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION" PL/pgSQL function inline_code_block line 8 at SQL statement

This did not happen in the previous version 1.163.6

Expected behavior

To run regardless since we explicitly say NOSUPERUSER

Screenshots
If applicable, add screenshots to help explain your problem.

System information
Rerun the failing command with --create-ticket flag.

  • Ticket ID: [e.g. ab1ac733e31e4f928a4d7c8402543712]
  • Version of OS: [e.g. Ubuntu 22.04]
  • Version of CLI: 1.164.1
  • Version of Docker: [e.g. v25.0.3]
  • Versions of services: [output from supabase services command]

Additional context
If applicable, add any other context about the problem here.

  • Browser [e.g. chrome, safari]
  • Version of supabase-js [e.g. v2.22.0]
  • Version of Node.js [e.g. v16.20.0]
@sweatybridge
Copy link
Contributor

@soedirgo I wonder if this is an issue with supautils? I haven't tried reproducing myself.

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

No branches or pull requests

2 participants