Rename the SecurityGroupUnderSchema to SecurityGroupSchema, and
redefined in the database (instead of schema) javascript module, as it is also used by the foreign-server node too. Reported by: Neel Patelpull/6/head
parent
8c8c0e78ca
commit
ac2512799e
|
@ -148,7 +148,7 @@ define('pgadmin.node.foreign_server', [
|
|||
model: OptionsModel, control: 'unique-col-collection', mode: ['edit', 'create'],
|
||||
canAdd: true, canDelete: true, uniqueCol : ['fsrvoption'],
|
||||
columns: ['fsrvoption','fsrvvalue']
|
||||
}, pgBrowser.SecurityGroupUnderSchema, {
|
||||
}, pgBrowser.SecurityGroupSchema, {
|
||||
id: 'fsrvacl', label: 'Privileges', type: 'collection', group: 'security',
|
||||
model: pgAdmin.Browser.Node.PrivilegeRoleModel.extend({privileges: ['U']}), control: 'unique-col-collection',
|
||||
mode: ['edit', 'create'], canAdd: true, canDelete: true, uniqueCol : ['grantee']
|
||||
|
|
|
@ -263,7 +263,7 @@ define('pgadmin.node.domain', [
|
|||
model: ConstraintModel, canAdd: true, canDelete: true,
|
||||
canEdit: false, columns: ['conname','consrc', 'convalidated']
|
||||
},
|
||||
pgBrowser.SecurityGroupUnderSchema,
|
||||
pgBrowser.SecurityGroupSchema,
|
||||
{
|
||||
id: 'seclabels', label: gettext('Security Labels'),
|
||||
model: pgBrowser.SecLabelModel, type: 'collection',
|
||||
|
|
|
@ -639,7 +639,7 @@ define('pgadmin.node.foreign_table', [
|
|||
id: 'relacl', label: gettext('Privileges'), cell: 'string',
|
||||
type: 'text', group: gettext('Security'),
|
||||
mode: ['properties'], min_version: 90200
|
||||
}, pgBrowser.SecurityGroupUnderSchema, {
|
||||
}, pgBrowser.SecurityGroupSchema, {
|
||||
id: 'acl', label: gettext('Privileges'), model: pgAdmin
|
||||
.Browser.Node.PrivilegeRoleModel.extend(
|
||||
{privileges: ['a','r','w','x']}), uniqueCol : ['grantee', 'grantor'],
|
||||
|
|
|
@ -316,7 +316,7 @@ define('pgadmin.node.function', [
|
|||
model: pgBrowser.Node.VariableModel,
|
||||
mode: ['edit', 'create'], canAdd: 'canVarAdd', canEdit: false,
|
||||
canDelete: true, disabled: 'isDisabled'
|
||||
}, pgBrowser.SecurityGroupUnderSchema, {
|
||||
}, pgBrowser.SecurityGroupSchema, {
|
||||
id: 'acl', label: gettext('Privileges'), editable: false,
|
||||
model: pgBrowser.Node.PrivilegeRoleModel.extend({
|
||||
privileges: ['X']
|
||||
|
|
|
@ -227,7 +227,7 @@ define('pgadmin.node.trigger_function', [
|
|||
id: 'proleakproof', label: gettext('Leak proof?'),
|
||||
group: gettext('Options'), cell:'boolean', type: 'switch', min_version: 90200,
|
||||
disabled: 'isDisabled'
|
||||
}, pgBrowser.SecurityGroupUnderSchema, {
|
||||
}, pgBrowser.SecurityGroupSchema, {
|
||||
id: 'proacl', label: gettext('Privileges'), mode: ['properties'],
|
||||
group: gettext('Security'), type: 'text'
|
||||
},{
|
||||
|
|
|
@ -177,7 +177,7 @@ define('pgadmin.node.sequence', [
|
|||
'onColor': 'success', 'offColor': 'primary',
|
||||
'size': 'small'
|
||||
}
|
||||
}, pgBrowser.SecurityGroupUnderSchema,{
|
||||
}, pgBrowser.SecurityGroupSchema,{
|
||||
id: 'acl', label: gettext('Privileges'), type: 'text',
|
||||
group: gettext('Security'), mode: ['properties'], disabled: true
|
||||
},{
|
||||
|
|
|
@ -106,20 +106,6 @@ define('pgadmin.node.schema', [
|
|||
}
|
||||
};
|
||||
|
||||
pgBrowser.SecurityGroupUnderSchema = {
|
||||
id: 'security', label: gettext('Security'), type: 'group',
|
||||
// Show/Hide security group for nodes under the catalog
|
||||
visible: function(args) {
|
||||
if (args && 'node_info' in args) {
|
||||
// If node_info is not present in current object then it might in its
|
||||
// parent in case if we used sub node control
|
||||
var node_info = args.node_info || args.handler.node_info;
|
||||
return 'catalog' in node_info ? false : true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
// Define Security Model with fields and validation for VacuumSettings Control
|
||||
var VacuumTableModel = Backform.VacuumTableModel = pgBrowser.Node.Model.extend({
|
||||
defaults: {
|
||||
|
|
|
@ -554,7 +554,7 @@ define('pgadmin.node.column', [
|
|||
model: VariablesModel, uniqueCol : ['name'],
|
||||
mode: ['edit', 'create'], canAdd: true, canEdit: false,
|
||||
canDelete: true
|
||||
}, pgBrowser.SecurityGroupUnderSchema, {
|
||||
}, pgBrowser.SecurityGroupSchema, {
|
||||
id: 'attacl', label: 'Privileges', type: 'collection',
|
||||
group: 'security', control: 'unique-col-collection',
|
||||
model: pgBrowser.Node.PrivilegeRoleModel.extend({
|
||||
|
|
|
@ -996,7 +996,7 @@ function(gettext, url_for, $, _, S, pgAdmin, pgBrowser, Backform, alertify) {
|
|||
},{
|
||||
id: 'relacl_str', label: gettext('Privileges'), disabled: 'inSchema',
|
||||
type: 'text', mode: ['properties'], group: gettext('Security')
|
||||
}, pgBrowser.SecurityGroupUnderSchema,{
|
||||
}, pgBrowser.SecurityGroupSchema,{
|
||||
id: 'relacl', label: gettext('Privileges'), type: 'collection',
|
||||
group: 'security', control: 'unique-col-collection',
|
||||
model: pgBrowser.Node.PrivilegeRoleModel.extend({
|
||||
|
|
|
@ -1051,7 +1051,7 @@ define('pgadmin.node.table', [
|
|||
},{
|
||||
id: 'relacl_str', label: gettext('Privileges'), disabled: 'inSchema',
|
||||
type: 'text', mode: ['properties'], group: gettext('Security')
|
||||
}, pgBrowser.SecurityGroupUnderSchema,{
|
||||
}, pgBrowser.SecurityGroupSchema,{
|
||||
id: 'relacl', label: gettext('Privileges'), type: 'collection',
|
||||
group: 'security', control: 'unique-col-collection',
|
||||
model: pgBrowser.Node.PrivilegeRoleModel.extend({
|
||||
|
|
|
@ -716,7 +716,7 @@ define('pgadmin.node.type', [
|
|||
id: 'alias', label: gettext('Alias'), cell: 'string',
|
||||
type: 'text', mode: ['properties'],
|
||||
disabled: 'inSchema'
|
||||
}, pgBrowser.SecurityGroupUnderSchema,{
|
||||
}, pgBrowser.SecurityGroupSchema,{
|
||||
id: 'type_acl', label: gettext('Privileges'), cell: 'string',
|
||||
type: 'text', mode: ['properties'], group: 'security',
|
||||
disabled: 'inSchema'
|
||||
|
|
|
@ -148,7 +148,7 @@ define('pgadmin.node.mview', [
|
|||
},{
|
||||
id: 'system_view', label: gettext('System view?'), cell: 'string',
|
||||
type: 'switch', disabled: true, mode: ['properties'],
|
||||
}, pgBrowser.SecurityGroupUnderSchema, {
|
||||
}, pgBrowser.SecurityGroupSchema, {
|
||||
id: 'acl', label: gettext('Privileges'),
|
||||
mode: ['properties'], type: 'text', group: gettext('Security')
|
||||
},{
|
||||
|
|
|
@ -147,7 +147,7 @@ define('pgadmin.node.view', [
|
|||
type: 'text', mode: ['create', 'edit'], group: gettext('Definition'),
|
||||
control: Backform.SqlFieldControl,
|
||||
disabled: 'notInSchema'
|
||||
}, pgBrowser.SecurityGroupUnderSchema, {
|
||||
}, pgBrowser.SecurityGroupSchema, {
|
||||
// Add Privilege Control
|
||||
id: 'datacl', label: gettext('Privileges'), type: 'collection',
|
||||
model: pgBrowser.Node.PrivilegeRoleModel.extend({
|
||||
|
|
|
@ -468,6 +468,20 @@ define('pgadmin.node.database', [
|
|||
})
|
||||
});
|
||||
|
||||
pgBrowser.SecurityGroupSchema = {
|
||||
id: 'security', label: gettext('Security'), type: 'group',
|
||||
// Show/Hide security group for nodes under the catalog
|
||||
visible: function(args) {
|
||||
if (args && 'node_info' in args) {
|
||||
// If node_info is not present in current object then it might in its
|
||||
// parent in case if we used sub node control
|
||||
var node_info = args.node_info || args.handler.node_info;
|
||||
return 'catalog' in node_info ? false : true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
function connect_to_database(obj, data, tree, item, interactive) {
|
||||
connect(obj, data, tree, item)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue