Files
pgadmin4/web/pgadmin/browser/server_groups/servers/templates/macros/privilege.macros
T
Harshal Dhumal d0f7e69ad7 Added two jinja2 template macro for support for priviliges and default
privileges.

Also, made a change in the privilege.js to scroll the div to make the
opening div visible properly.
2016-01-22 18:07:12 +05:30

11 lines
476 B
Plaintext

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