Merge pull request #481 from CartoDB/fix-validatePGEntitiesAccess
fix validatePGEntitiesAccess access
This commit is contained in:
commit
6ad54b284f
@ -20,7 +20,7 @@ const Validator = {
|
|||||||
let softValidationResult = true;
|
let softValidationResult = true;
|
||||||
|
|
||||||
if (!!affectedTables && affectedTables.tables) {
|
if (!!affectedTables && affectedTables.tables) {
|
||||||
if (global.validatePGEntitiesAccess) {
|
if (global.settings.validatePGEntitiesAccess) {
|
||||||
hardValidationResult = this.hardValidation(affectedTables.tables);
|
hardValidationResult = this.hardValidation(affectedTables.tables);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ describe('PG entities access validator', function () {
|
|||||||
|
|
||||||
describe('validatePGEntitiesAccess enabled', function() {
|
describe('validatePGEntitiesAccess enabled', function() {
|
||||||
before(function(){
|
before(function(){
|
||||||
global.validatePGEntitiesAccess = true;
|
global.settings.validatePGEntitiesAccess = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
forbiddenQueries.forEach(query => {
|
forbiddenQueries.forEach(query => {
|
||||||
@ -42,7 +42,7 @@ describe('PG entities access validator', function () {
|
|||||||
|
|
||||||
describe('validatePGEntitiesAccess disabled', function() {
|
describe('validatePGEntitiesAccess disabled', function() {
|
||||||
before(function(){
|
before(function(){
|
||||||
global.validatePGEntitiesAccess = false;
|
global.settings.validatePGEntitiesAccess = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
forbiddenQueries.forEach(query => {
|
forbiddenQueries.forEach(query => {
|
||||||
|
@ -73,11 +73,11 @@ const fakeAffectedTablesTopologyKO = [
|
|||||||
|
|
||||||
describe('pg entities access validator with validatePGEntitiesAccess enabled', function () {
|
describe('pg entities access validator with validatePGEntitiesAccess enabled', function () {
|
||||||
before(function() {
|
before(function() {
|
||||||
global.validatePGEntitiesAccess = true;
|
global.settings.validatePGEntitiesAccess = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
after(function() {
|
after(function() {
|
||||||
global.validatePGEntitiesAccess = false;
|
global.settings.validatePGEntitiesAccess = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
it('validate function: bad parameters', function () {
|
it('validate function: bad parameters', function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user