Resolved an issue related to no proper valid/invalid event was

generated for the privilege control. Also, made changes in the
PrivilegeRoleModel, to allow to select a grantee only once for the
current user (as grantor), and omit them from other cell objects.

Valid/Invalid event was not properly triggered, whenever the child
attribute is a collection/model within a model (nested mode/collection
within model). This patch tried to take care of all such scenarios in
general.
This commit is contained in:
Ashesh Vashi
2016-03-15 19:00:58 +05:30
parent b52a5736ff
commit 4adea4dc25
3 changed files with 293 additions and 156 deletions

View File

@@ -38,6 +38,11 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
category: 'drop', priority: 5, label: '{{ _('Disconnect Server...') }}',
icon: 'fa fa-chain-broken', enable : 'is_connected'
}]);
pgBrowser.messages['PRIV_GRANTEE_NOT_SPECIFIED'] =
'{{ _('Please select the grantee from the list!') }}';
pgBrowser.messages['NO_PRIV_SELECTED'] =
'{{ _('Please select at least one privilege to grant!') }}';
},
is_not_connected: function(node) {
return (node && node.connected != true);
@@ -259,7 +264,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
tree.select(item);
tree.open(item);
}, 10);
}
};
@@ -348,7 +353,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
return onFailure(xhr, status, error, obj, data, tree, item);
});
}
/* Send PING to indicate that session is alive */
function server_status(server_id)
{