mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Introduced the VariableControl, which will be used in role(s),
database(s), and tablespace(s). Thanks Harshal Dhumal for sharing the original patch. I've modified a lot to work by fetching the variables later by giving a url. Also, - Introduced the template macros for SECURITY LABELS and VARIABLES. - Improvised the Backform.Control with better syntactic approach. - Introduced a jquery function pgMakeVisible(..) to make it visible under any obj which can be identified by unique class.
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
{% macro APPLY(conn, type, name, provider, label) -%}
|
||||
SECURITY LABEL FOR {{ conn|qtIdent(provider) }} ON {{ type }} {{ conn|qtIdent(name) }} IS {{ label|qtLiteral }};
|
||||
{%- endmacro %}
|
||||
{% macro DROP(conn, type, name, provider) -%}
|
||||
SECURITY LABEL FOR {{ conn|qtIdent(provider) }} ON {{ type }} {{ conn|qtIdent(name) }} IS NULL;
|
||||
{%- endmacro %}
|
||||
@@ -0,0 +1,6 @@
|
||||
{% macro APPLY(conn, database, role, param, value) -%}
|
||||
ALTER {% if role %}ROLE {{ self.conn|qtIdent(role) }}{% if database %} IN DATABASE {{ conn|qtIdent(database) }}{% endif %}{% else %}DATABASE {{ conn|qtIdent(database) }}{% endif %} SET {{ conn|qtIdent(param) }} TO {{ value|qtLiteral }};
|
||||
{%- endmacro %}
|
||||
{% macro DROP(conn, database, role, param) -%}
|
||||
ALTER {% if role %}ROLE {{ self.conn|qtIdent(role) }}{% if database %} IN DATABASE {{ conn|qtIdent(database) }}{% endif %}{% else %}DATABASE {{ conn|qtIdent(database) }}{% endif %} RESET {{ conn|qtIdent(param) }};
|
||||
{%- endmacro %}
|
||||
Reference in New Issue
Block a user