mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Internal sever error displayed if create New user mapping with public user. Fixes #1468
This commit is contained in:
@@ -5,5 +5,5 @@ SELECT srvname as name FROM pg_foreign_server srv LEFT OUTER JOIN pg_foreign_dat
|
||||
{% endif %}
|
||||
{# ============= Drop/Delete cascade user mapping ============= #}
|
||||
{% if name and data %}
|
||||
DROP USER MAPPING FOR {{ conn|qtIdent(data.name) }} SERVER {{ conn|qtIdent(name) }}
|
||||
DROP USER MAPPING FOR {% if data.name == "CURRENT_USER" or data.name == "PUBLIC" %}{{ data.name }}{% else %}{{ conn|qtIdent(data.name) }}{% endif %} SERVER {{ conn|qtIdent(name) }}
|
||||
{% endif %}
|
||||
@@ -14,7 +14,7 @@ WITH umapData AS
|
||||
)
|
||||
SELECT * FROM umapData
|
||||
{% if data %}
|
||||
WHERE {% if data.name == "CURRENT_USER" %} name = {{data.name}} {% elif data.name == "PUBLIC" %} name = {{data.name.lower()|qtLiteral}} {% else %} name = {{data.name|qtLiteral}} {% endif %}
|
||||
WHERE {% if data.name == "CURRENT_USER" %} name = {{data.name}} {% elif data.name == "PUBLIC" %} name = {{data.name|qtLiteral}} {% else %} name = {{data.name|qtLiteral}} {% endif %}
|
||||
{% endif %}
|
||||
{% if fdwdata %}
|
||||
WHERE fdw.fdwname = {{fdwdata.name|qtLiteral}}::text
|
||||
|
||||
Reference in New Issue
Block a user