mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Updated Privileges macros under Schema node.
The changes are required due to previous commit (8a7ec6b452
) regarding "parse_priv_to_db" function.
This commit is contained in:
parent
77ae220f1e
commit
d32e861a47
@ -1,12 +1,12 @@
|
|||||||
{##############################################}
|
{##############################################}
|
||||||
{# Macros for Privileges (functions module) #}
|
{# Macros for Privileges (functions module) #}
|
||||||
{##############################################}
|
{##############################################}
|
||||||
{% macro SET(conn, type, role, param, priv, with_grant, schema, func_args) -%}
|
{% macro SET(conn, type, role, param, privs, with_grant_privs, schema, func_args) -%}
|
||||||
{% if priv %}
|
{% if privs %}
|
||||||
GRANT {{ priv }} ON {{ type }} {{ conn|qtIdent(schema, param) }}({{func_args}}) TO {{ conn|qtIdent(role) }};
|
GRANT {{ privs|join(', ') }} ON {{ type }} {{ conn|qtIdent(schema, param) }}({{func_args}}) TO {{conn|qtIdent(role) }};
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if with_grant %}
|
{% if with_grant_privs %}
|
||||||
GRANT {{ with_grant }} ON {{ type }} {{ conn|qtIdent(schema, param) }}({{func_args}}) TO {{ conn|qtIdent(role) }} WITH GRANT OPTION;
|
GRANT {{ with_grant_privs|join(', ') }} ON {{ type }} {{ conn|qtIdent(schema, param) }}({{func_args}}) TO {{ conn|qtIdent(role) }} WITH GRANT OPTION;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
{% macro UNSETALL(conn, type, role, param, schema, func_args) -%}
|
{% macro UNSETALL(conn, type, role, param, schema, func_args) -%}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
{##########################################}
|
{##########################################}
|
||||||
{# Macros for schema and its child nodes #}
|
{# Macros for schema and its child nodes #}
|
||||||
{##########################################}
|
{##########################################}
|
||||||
{% macro SET(conn, type, role, param, priv, with_grant, schema) -%}
|
{% macro SET(conn, type, role, param, privs, with_grant_privs, schema) -%}
|
||||||
{% if priv %}
|
{% if privs %}
|
||||||
GRANT {{ priv }} ON {{ type }} {{ conn|qtIdent(schema, param) }} TO {{ conn|qtIdent(role) }};
|
GRANT {{ privs|join(', ') }} ON {{ type }} {{ conn|qtIdent(schema, param) }} TO {{ conn|qtIdent(role) }};
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if with_grant %}
|
{% if with_grant_privs %}
|
||||||
GRANT {{ with_grant }} ON {{ type }} {{ conn|qtIdent(schema, param) }} TO {{ conn|qtIdent(role) }} WITH GRANT OPTION;
|
GRANT {{ with_grant_privs|join(', ') }} ON {{ type }} {{ conn|qtIdent(schema, param) }} TO {{ conn|qtIdent(role) }} WITH GRANT OPTION;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
{% macro UNSETALL(conn, type, role, param, schema) -%}
|
{% macro UNSETALL(conn, type, role, param, schema) -%}
|
||||||
|
Loading…
Reference in New Issue
Block a user