mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure that the superuser should be able to create database and role, as the superuser
overrides all the access restrictions. Fixes #4792 Fixes #4878
This commit is contained in:
@@ -492,7 +492,8 @@ WHERE db.datname = current_database()""")
|
||||
status = _execute(cur, """
|
||||
SELECT
|
||||
oid as id, rolname as name, rolsuper as is_superuser,
|
||||
rolcreaterole as can_create_role, rolcreatedb as can_create_db
|
||||
CASE WHEN rolsuper THEN true ELSE rolcreaterole END as can_create_role,
|
||||
CASE WHEN rolsuper THEN true ELSE rolcreatedb END as can_create_db
|
||||
FROM
|
||||
pg_catalog.pg_roles
|
||||
WHERE
|
||||
|
Reference in New Issue
Block a user