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.');
|
||||
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.stdout.pipe(process.stdout);
|
||||
serverProcess.stderr.pipe(process.stderr);
|
||||
});
|
||||
}
|
||||
|
||||
let clientProcess;
|
||||
|
@ -97,7 +100,8 @@ function killClient(onExit) {
|
|||
}
|
||||
|
||||
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) {
|
||||
|
|
|
@ -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);
|
||||
})
|
||||
.then(function() {
|
||||
const targetUrl = ObjectPath.get(req, 'headers.x-target-url', null);
|
||||
const targetUrl = ObjectPath.get(req, "headers.x-target-url", undefined);
|
||||
|
||||
if (!targetUrl) {
|
||||
res.status(204);
|
||||
|
@ -76,12 +76,12 @@ export default function (vars: ServerVariables) {
|
|||
const resObject: Object = {
|
||||
domain: resource.domain,
|
||||
resource: resource.path,
|
||||
}
|
||||
};
|
||||
|
||||
const subject: Subject = {
|
||||
user: authSession.userid,
|
||||
groups: authSession.groups
|
||||
}
|
||||
};
|
||||
|
||||
const authorizationLevel = vars.authorizer.authorization(resObject, subject);
|
||||
if (authorizationLevel <= AuthorizationLevel.ONE_FACTOR) {
|
||||
|
|
Loading…
Reference in New Issue