diff --git a/docs/en_US/release_notes_4_16.rst b/docs/en_US/release_notes_4_16.rst index 8458b2d01..9277b4082 100644 --- a/docs/en_US/release_notes_4_16.rst +++ b/docs/en_US/release_notes_4_16.rst @@ -17,4 +17,6 @@ Housekeeping Bug fixes ********* +| `Issue #4792 `_ - Ensure that the superuser should be able to create database, as the superuserĀ overrides all the access restrictions. +| `Issue #4878 `_ - Ensure that the superuser should be able to create role, as the superuserĀ overrides all the access restrictions. | `Issue #4934 `_ - Fix the help button link on the User Management dialog. diff --git a/web/pgadmin/utils/driver/psycopg2/connection.py b/web/pgadmin/utils/driver/psycopg2/connection.py index 9e6aaa5d6..2a0ca821e 100644 --- a/web/pgadmin/utils/driver/psycopg2/connection.py +++ b/web/pgadmin/utils/driver/psycopg2/connection.py @@ -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