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:
Khushboo Vashi 2016-03-10 12:00:29 +00:00 committed by Dave Page
parent 77ae220f1e
commit d32e861a47
2 changed files with 10 additions and 10 deletions

View File

@ -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) -%}

View File

@ -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) -%}