mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-24 07:16:52 -06:00
Fixed an issue where the DB restriction check was not working for the collection node. Fixes #7453
This commit is contained in:
parent
3297546e0a
commit
99c7a50fd6
@ -25,13 +25,14 @@ WHERE
|
||||
db.datistemplate = {{show_user_defined_templates}} AND
|
||||
{% endif %}
|
||||
{% if did %}
|
||||
db.oid = {{ did|qtLiteral }}::OID{% else %}{% if name %}
|
||||
db.datname = {{ name|qtLiteral }}::text{% else %}
|
||||
db.oid > {{ last_system_oid|qtLiteral }}::OID OR db.datname IN ('postgres', 'edb')
|
||||
{% endif %}{% endif %}
|
||||
db.oid = {{ did|qtLiteral }}::OID
|
||||
{% endif %}
|
||||
{% if db_restrictions %}
|
||||
AND
|
||||
|
||||
{% if did %}AND{% endif %}
|
||||
db.datname in ({{db_restrictions}})
|
||||
{% elif not did%}
|
||||
db.oid > {{ last_system_oid }}::OID OR db.datname IN ('postgres', 'edb')
|
||||
{% endif %}
|
||||
|
||||
ORDER BY datname;
|
||||
|
@ -30,14 +30,14 @@ FROM pg_catalog.pg_database db
|
||||
db.oid=descr.objoid AND descr.classoid='pg_database'::regclass
|
||||
)
|
||||
WHERE {% if did %}
|
||||
db.oid = {{ did|qtLiteral }}::OID{% else %}{% if name %}
|
||||
db.datname = {{ name|qtLiteral }}::text{% else %}
|
||||
db.oid > {{ last_system_oid|qtLiteral }}::OID OR db.datname IN ('postgres', 'edb')
|
||||
{% endif %}{% endif %}
|
||||
db.oid = {{ did|qtLiteral }}::OID
|
||||
{% endif %}
|
||||
{% if db_restrictions %}
|
||||
|
||||
AND
|
||||
{% if did %}AND{% endif %}
|
||||
db.datname in ({{db_restrictions}})
|
||||
{% elif not did%}
|
||||
db.oid > {{ last_system_oid }}::OID OR db.datname IN ('postgres', 'edb')
|
||||
{% endif %}
|
||||
|
||||
AND db.datistemplate in (false, {{show_system_objects}})
|
||||
|
@ -37,14 +37,14 @@ FROM pg_catalog.pg_database db
|
||||
db.oid=descr.objoid AND descr.classoid='pg_database'::regclass
|
||||
)
|
||||
WHERE {% if did %}
|
||||
db.oid = {{ did|qtLiteral }}::OID{% else %}{% if name %}
|
||||
db.datname = {{ name|qtLiteral }}::text{% else %}
|
||||
db.oid > {{ last_system_oid|qtLiteral }}::OID OR db.datname IN ('postgres', 'edb')
|
||||
{% endif %}{% endif %}
|
||||
db.oid = {{ did|qtLiteral }}::OID
|
||||
{% endif %}
|
||||
{% if db_restrictions %}
|
||||
|
||||
AND
|
||||
{% if did %}AND{% endif %}
|
||||
db.datname in ({{db_restrictions}})
|
||||
{% elif not did%}
|
||||
db.oid > {{ last_system_oid }}::OID OR db.datname IN ('postgres', 'edb')
|
||||
{% endif %}
|
||||
|
||||
AND db.datistemplate in (false, {{show_system_objects}})
|
||||
|
@ -21,14 +21,14 @@ FROM pg_catalog.pg_database db
|
||||
db.oid=descr.objoid AND descr.classoid='pg_database'::regclass
|
||||
)
|
||||
WHERE {% if did %}
|
||||
db.oid = {{ did|qtLiteral }}::OID{% else %}{% if name %}
|
||||
db.datname = {{ name|qtLiteral }}::text{% else %}
|
||||
db.oid > {{ last_system_oid|qtLiteral }}::OID OR db.datname IN ('postgres', 'edb')
|
||||
{% endif %}{% endif %}
|
||||
db.oid = {{ did|qtLiteral }}::OID
|
||||
{% endif %}
|
||||
{% if db_restrictions %}
|
||||
|
||||
AND
|
||||
{% if did %}AND{% endif %}
|
||||
db.datname in ({{db_restrictions}})
|
||||
{% elif not did%}
|
||||
db.oid > {{ last_system_oid }}::OID OR db.datname IN ('postgres', 'edb')
|
||||
{% endif %}
|
||||
|
||||
ORDER BY datname;
|
||||
|
Loading…
Reference in New Issue
Block a user