pgadmin4/web/pgadmin/browser/server_groups/servers/templates/macros/privilege.macros

11 lines
477 B
Plaintext

{% macro APPLY(conn, type, role, param, privs, with_grant_privs) -%}
{% if privs %}
GRANT {{ privs|join(', ') }} ON {{ type }} {{ conn|qtIdent(param) }} TO {{ role }};
{% endif %}
{% if with_grant_privs %}
GRANT {{ with_grant_privs|join(', ') }} ON {{ type }} {{ conn|qtIdent(param) }} TO {{ role }} WITH GRANT OPTION;
{% endif %}
{%- endmacro %}
{% macro RESETALL(conn, type, role, param) -%}
REVOKE ALL ON {{ type }} {{ conn|qtIdent(param) }} FROM {{ role }};
{%- endmacro %}