diff --git a/ExpressAPI/src/config/Config.ts b/ExpressAPI/src/config/Config.ts index 574f9b2ea0e987c896a5075d4ac6dac7f7dbac55..369959d7aee3655af4733916a95f5060df10002a 100644 --- a/ExpressAPI/src/config/Config.ts +++ b/ExpressAPI/src/config/Config.ts @@ -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 {