Merge pull request #481 from CartoDB/fix-validatePGEntitiesAccess

fix validatePGEntitiesAccess access
This commit is contained in:
Simon Martín 2018-04-26 10:59:40 +02:00 committed by GitHub
commit 6ad54b284f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -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);
} }

View File

@ -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 => {

View File

@ -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 () {