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) #}
|
||||
{##############################################}
|
||||
{% macro SET(conn, type, role, param, priv, with_grant, schema, func_args) -%}
|
||||
{% if priv %}
|
||||
GRANT {{ priv }} ON {{ type }} {{ conn|qtIdent(schema, param) }}({{func_args}}) TO {{ conn|qtIdent(role) }};
|
||||
{% macro SET(conn, type, role, param, privs, with_grant_privs, schema, func_args) -%}
|
||||
{% if privs %}
|
||||
GRANT {{ privs|join(', ') }} ON {{ type }} {{ conn|qtIdent(schema, param) }}({{func_args}}) TO {{conn|qtIdent(role) }};
|
||||
{% endif %}
|
||||
{% if with_grant %}
|
||||
GRANT {{ with_grant }} ON {{ type }} {{ conn|qtIdent(schema, param) }}({{func_args}}) TO {{ conn|qtIdent(role) }} WITH GRANT OPTION;
|
||||
{% if with_grant_privs %}
|
||||
GRANT {{ with_grant_privs|join(', ') }} ON {{ type }} {{ conn|qtIdent(schema, param) }}({{func_args}}) TO {{ conn|qtIdent(role) }} WITH GRANT OPTION;
|
||||
{% endif %}
|
||||
{%- endmacro %}
|
||||
{% macro UNSETALL(conn, type, role, param, schema, func_args) -%}
|
||||
|
@ -1,12 +1,12 @@
|
||||
{##########################################}
|
||||
{# Macros for schema and its child nodes #}
|
||||
{##########################################}
|
||||
{% macro SET(conn, type, role, param, priv, with_grant, schema) -%}
|
||||
{% if priv %}
|
||||
GRANT {{ priv }} ON {{ type }} {{ conn|qtIdent(schema, param) }} TO {{ conn|qtIdent(role) }};
|
||||
{% macro SET(conn, type, role, param, privs, with_grant_privs, schema) -%}
|
||||
{% if privs %}
|
||||
GRANT {{ privs|join(', ') }} ON {{ type }} {{ conn|qtIdent(schema, param) }} TO {{ conn|qtIdent(role) }};
|
||||
{% endif %}
|
||||
{% if with_grant %}
|
||||
GRANT {{ with_grant }} ON {{ type }} {{ conn|qtIdent(schema, param) }} TO {{ conn|qtIdent(role) }} WITH GRANT OPTION;
|
||||
{% if with_grant_privs %}
|
||||
GRANT {{ with_grant_privs|join(', ') }} ON {{ type }} {{ conn|qtIdent(schema, param) }} TO {{ conn|qtIdent(role) }} WITH GRANT OPTION;
|
||||
{% endif %}
|
||||
{%- endmacro %}
|
||||
{% macro UNSETALL(conn, type, role, param, schema) -%}
|
||||
|
Loading…
Reference in New Issue
Block a user