mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-09 07:33:19 -06:00
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.
This commit is contained in:
parent
7f3c972d06
commit
d0f7e69ad7
@ -272,6 +272,10 @@
|
||||
$(self.$el.find('input[type=checkbox]')).on('blur',function() {
|
||||
self.$el.blur();
|
||||
});
|
||||
|
||||
// Make row visible in when entering in edit mode.
|
||||
$(self.$el).pgMakeVisible('backform-tab');
|
||||
|
||||
self.delegateEvents();
|
||||
|
||||
return this;
|
||||
|
@ -0,0 +1,14 @@
|
||||
{% macro APPLY(conn, type, role, priv, with_grant) -%}
|
||||
{% if priv %}
|
||||
ALTER DEFAULT PRIVILEGES
|
||||
GRANT {{ priv }} ON {{ type }} TO {{ conn|qtIdent(role) }};
|
||||
{% endif %}
|
||||
{% if with_grant %}
|
||||
ALTER DEFAULT PRIVILEGES
|
||||
GRANT {{ with_grant }} ON {{ type }} TO {{ conn|qtIdent(role) }} WITH GRANT OPTION;
|
||||
{% endif %}
|
||||
{%- endmacro %}
|
||||
{% macro RESETALL(conn, type, role) -%}
|
||||
ALTER DEFAULT PRIVILEGES
|
||||
REVOKE ALL ON {{ type }} FROM {{ conn|qtIdent(role) }};
|
||||
{%- endmacro %}
|
@ -0,0 +1,11 @@
|
||||
{% 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 %}
|
Loading…
Reference in New Issue
Block a user