From e14993114f0ec370775010eee4ad0d302a0beebb Mon Sep 17 00:00:00 2001 From: Rainer Killinger Date: Mon, 24 Jan 2022 14:43:05 +0100 Subject: [PATCH] fix: add auth object to index route --- src/config/user.ts | 10 ++++------ src/protocol/routes/index.ts | 6 ++++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/config/user.ts b/src/config/user.ts index 4487aeba..aef45b40 100644 --- a/src/config/user.ts +++ b/src/config/user.ts @@ -13,8 +13,6 @@ * this program. If not, see . */ -import {SCAcademicPriceGroup} from '../things/abstract/thing-that-can-be-offered'; - /** * User configuration keys mapped to string type while including their requiredness */ @@ -37,10 +35,6 @@ interface SCUserConfigurationRequired { * The complete name of the user combining all the parts of the name into one */ name: string; - /** - * Role assigned to the user - */ - role: keyof SCAcademicPriceGroup; } /** @@ -59,6 +53,10 @@ interface SCUserConfigurationRequired { * User's given name */ givenName?: string; + /** + * Role assigned to the user + */ + role?: string; /** * Student ID given to the user */ diff --git a/src/protocol/routes/index.ts b/src/protocol/routes/index.ts index 79669716..8fe23cd6 100644 --- a/src/protocol/routes/index.ts +++ b/src/protocol/routes/index.ts @@ -14,6 +14,7 @@ */ import {StatusCodes} from 'http-status-codes'; import {SCAppConfiguration} from '../../config/app'; +import {SCAuthorizationProvider, SCAuthorizationProviderType} from '../../config/authorization'; import {SCBackendConfiguration} from '../../config/backend'; import {SCInternalServerErrorResponse} from '../errors/internal-server-error'; import {SCMethodNotAllowedErrorResponse} from '../errors/method-not-allowed'; @@ -42,6 +43,11 @@ export interface SCIndexResponse { */ app: SCAppConfiguration; + /** + * @see SCAuthorizationProvider + */ + auth: { [key in SCAuthorizationProviderType]?: SCAuthorizationProvider; }; + /** * @see SCBackendConfiguration */