Skip to content
Snippets Groups Projects
Commit 8a937e2e authored by michael.minelli's avatar michael.minelli
Browse files

Config => Add gitlab secret

parent 6211a07c
No related branches found
No related tags found
No related merge requests found
......@@ -19,8 +19,12 @@ class Config {
secret: string; expiresIn: number;
};
public readonly permissions: {
teachingStaff: Array<string>;
public readonly login: {
gitlab: {
client: {
secret: string
}
}
};
public readonly gitlab: {
......@@ -35,9 +39,6 @@ class Config {
maxSameName: number; resultsFolder: string, pipelineResultsFolder: string; default: { description: string; visibility: string; };
};
public readonly userPasswordLength: number;
public readonly userPasswordSaltRounds: number;
constructor() {
this.api = {
port: Number(process.env.API_PORT || 30992)
......@@ -50,8 +51,12 @@ class Config {
expiresIn: Number(process.env.SESSION_TIMEOUT || 0)
};
this.permissions = {
teachingStaff: JSON5.parse(process.env.ROLES_WITH_TEACHING_STAFF_PERMISSIONS || '[]')
this.login = {
gitlab: {
client: {
secret: process.env.LOGIN_GITLAB_CLIENT_SECRET || ''
}
}
};
this.gitlab = {
......@@ -97,9 +102,6 @@ class Config {
visibility : process.env.EXERCISE_DEFAULT_VISIBILITY || GitlabVisibility.PRIVATE
}
};
this.userPasswordLength = Number(process.env.USER_PASSWORD_LENGTH || 0);
this.userPasswordSaltRounds = Number(process.env.USER_PASSWORD_SALT_ROUNDS || 10);
}
public getResultsFolder(exercise: Exercise): string {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment