Check linting issues on hotreload and fix remaining ones.
parent
29e2799021
commit
85d3adc3e3
|
@ -44,9 +44,12 @@ function startServer() {
|
||||||
console.log('Authelia is interrupted. Consider removing ' + AUTHELIA_INTERRUPT_FILENAME + ' if it\'s not expected.');
|
console.log('Authelia is interrupted. Consider removing ' + AUTHELIA_INTERRUPT_FILENAME + ' if it\'s not expected.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
exec('./node_modules/.bin/tslint', ['-c', 'server/tslint.json', '-p', 'server/tsconfig.json'])
|
||||||
|
.then(function() {
|
||||||
serverProcess = spawn('./scripts/run-dev-server.sh', [`test/suites/${program.suite}/config.yml`]);
|
serverProcess = spawn('./scripts/run-dev-server.sh', [`test/suites/${program.suite}/config.yml`]);
|
||||||
serverProcess.stdout.pipe(process.stdout);
|
serverProcess.stdout.pipe(process.stdout);
|
||||||
serverProcess.stderr.pipe(process.stderr);
|
serverProcess.stderr.pipe(process.stderr);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
let clientProcess;
|
let clientProcess;
|
||||||
|
@ -97,7 +100,8 @@ function killClient(onExit) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function generateConfigurationSchema() {
|
function generateConfigurationSchema() {
|
||||||
exec('./node_modules/.bin/typescript-json-schema -o server/src/lib/configuration/Configuration.schema.json --strictNullChecks --required server/tsconfig.json Configuration');
|
return ixec('./node_modules/.bin/typescript-json-schema',
|
||||||
|
['-o', 'server/src/lib/configuration/Configuration.schema.json', '--strictNullChecks', '--required', 'server/tsconfig.json', 'Configuration']);
|
||||||
}
|
}
|
||||||
|
|
||||||
function reload(path) {
|
function reload(path) {
|
||||||
|
|
|
@ -8,4 +8,4 @@ class AuthenticationError extends Error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default AuthenticationError
|
export default AuthenticationError;
|
|
@ -63,7 +63,7 @@ export default function (vars: ServerVariables) {
|
||||||
vars.regulator.mark(username, true);
|
vars.regulator.mark(username, true);
|
||||||
})
|
})
|
||||||
.then(function() {
|
.then(function() {
|
||||||
const targetUrl = ObjectPath.get(req, 'headers.x-target-url', null);
|
const targetUrl = ObjectPath.get(req, "headers.x-target-url", undefined);
|
||||||
|
|
||||||
if (!targetUrl) {
|
if (!targetUrl) {
|
||||||
res.status(204);
|
res.status(204);
|
||||||
|
@ -76,12 +76,12 @@ export default function (vars: ServerVariables) {
|
||||||
const resObject: Object = {
|
const resObject: Object = {
|
||||||
domain: resource.domain,
|
domain: resource.domain,
|
||||||
resource: resource.path,
|
resource: resource.path,
|
||||||
}
|
};
|
||||||
|
|
||||||
const subject: Subject = {
|
const subject: Subject = {
|
||||||
user: authSession.userid,
|
user: authSession.userid,
|
||||||
groups: authSession.groups
|
groups: authSession.groups
|
||||||
}
|
};
|
||||||
|
|
||||||
const authorizationLevel = vars.authorizer.authorization(resObject, subject);
|
const authorizationLevel = vars.authorizer.authorization(resObject, subject);
|
||||||
if (authorizationLevel <= AuthorizationLevel.ONE_FACTOR) {
|
if (authorizationLevel <= AuthorizationLevel.ONE_FACTOR) {
|
||||||
|
|
Loading…
Reference in New Issue