Skip to content
Snippets Groups Projects
Commit c0775c08 authored by Quentin CHEVALIER's avatar Quentin CHEVALIER
Browse files

Merge branch 'LDAP_changes' of gitlab.binets.fr:br/sigma-backend into LDAP_changes

parents 08535355 9c5d6b61
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,6 @@ variables:
cache:
paths:
- node_modules/
- ldap_credentials.json
stages:
- build
......@@ -38,9 +37,9 @@ tests:mocha:
stage: tests
script:
- npm ci && npm i -g knex
- echo '{"dn":"dn", "passwd":"passwd"}' >> ldap_credentials.json
# set up to use ldap, not ldaps
- export LDAP_URI=ldap://ldapdev.eleves.polytechnique.fr:389
- export LDAP_DN=uid=sigma,ou=services,dc=frankiz,dc=net
- export TARGET_ENV=staging
# in Kubernetes executor, hostname postgres is broken
- export DB_HOST=127.0.0.1
......
......@@ -39,7 +39,7 @@ dotenv.config();
let port = process.env.PORT;
const whitelist = process.env.ADMINS;
const whitelist = process.env.ADMINS.split(' ');
/**
* @function ensureIsAdmin
......
......@@ -107,7 +107,7 @@ export class Basics {
// Quand la recherche est finie on se déconnecte
res.on('end', res2 => {
// Si la co avec le LDAP est tombée on relance
if (res2.status == 0) Basics.bind();
if (res2.status != 0) Basics.bind();
resolve(true);
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment