mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Security label providers are an optional parameter. Fixes #1478.
This commit is contained in:
committed by
Dave Page
parent
f4f8273994
commit
b6e8d195dc
@@ -1,5 +1,5 @@
|
||||
{% macro APPLY(conn, type, name, provider, label) -%}
|
||||
SECURITY LABEL FOR {{ conn|qtIdent(provider) }} ON {{ type }} {{ conn|qtIdent(name) }} IS {{ label|qtLiteral }};
|
||||
SECURITY LABEL{% if provider and provider != '' %} FOR {{ conn|qtIdent(provider) }}{% endif %} 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;
|
||||
|
||||
@@ -23,14 +23,6 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
errmsg = null;
|
||||
this.errorModel.clear();
|
||||
|
||||
if (_.isUndefined(this.get('provider')) ||
|
||||
_.isNull(this.get('provider')) ||
|
||||
String(this.get('provider')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
errmsg = '{{ _('Provider must be specified.') }}';
|
||||
this.errorModel.set('provider', errmsg);
|
||||
return errmsg;
|
||||
}
|
||||
|
||||
if (_.isUndefined(this.get('label')) ||
|
||||
_.isNull(this.get('label')) ||
|
||||
String(this.get('label')).replace(/^\s+|\s+$/g, '') == '') {
|
||||
|
||||
Reference in New Issue
Block a user