Commit 4ae558a9 authored by Christopher Fullarton's avatar Christopher Fullarton

Adds environment setting to enable or disable the cas login for attendees

parent 44d49217
Pipeline #33736 passed with stages
in 15 minutes
......@@ -2,6 +2,7 @@ import { LoginMechanism } from '../enums/enums';
import { QuizTheme } from '../enums/QuizTheme';
export interface IEnvironment {
enableCasLogin: boolean;
sentryDSN?: string;
version: string;
claimSrc?: string;
......
......@@ -2,6 +2,7 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnIni
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { environment } from '../../../../environments/environment';
import { StorageKey } from '../../../lib/enums/enums';
import { IAvailableNicks } from '../../../lib/interfaces/IAvailableNicks';
import { NickApiService } from '../../../service/api/nick/nick-api.service';
......@@ -61,9 +62,11 @@ export class NicknameManagerComponent implements OnInit, OnDestroy {
) {
this.footerBarService.TYPE_REFERENCE = NicknameManagerComponent.TYPE;
this.footerBarService.replaceFooterElements([
this.footerBarService.footerElemBack, this.footerBarService.footerElemBlockRudeNicknames, this.footerBarService.footerElemEnableCasLogin,
]);
const footerElements = [this.footerBarService.footerElemBack, this.footerBarService.footerElemBlockRudeNicknames];
if (environment.enableCasLogin) {
footerElements.push(this.footerBarService.footerElemEnableCasLogin);
}
this.footerBarService.replaceFooterElements(footerElements);
this.quizService.loadDataToEdit(sessionStorage.getItem(StorageKey.CurrentQuizName));
}
......
......@@ -5,6 +5,7 @@ import { IEnvironment } from '../app/lib/interfaces/IEnvironment';
export const environment: IEnvironment = {
production: true,
version: 'VERSION',
enableCasLogin: true,
sentryDSN: 'https://f16c02fdefe64c018f5d580d1cf05b56@sentry.io/1819496',
ssrEndpoint: 'https://staging.arsnova.click/backend',
serverEndpoint: 'https://staging.arsnova.click/backend',
......
......@@ -5,6 +5,7 @@ import { IEnvironment } from '../app/lib/interfaces/IEnvironment';
export const environment: IEnvironment = {
production: true,
version: 'VERSION',
enableCasLogin: false,
sentryDSN: 'https://f16c02fdefe64c018f5d580d1cf05b56@sentry.io/1819496',
ssrEndpoint: 'https://beta.arsnova.click/backend',
serverEndpoint: 'https://beta.arsnova.click/backend',
......
......@@ -5,6 +5,7 @@ import { IEnvironment } from '../app/lib/interfaces/IEnvironment';
export const environment: IEnvironment = {
production: true,
version: 'VERSION',
enableCasLogin: true,
sentryDSN: 'https://f16c02fdefe64c018f5d580d1cf05b56@sentry.io/1819496',
ssrEndpoint: 'https://staging.arsnova.click/backend',
serverEndpoint: 'https://staging.arsnova.click/backend',
......
......@@ -10,6 +10,7 @@ import { IEnvironment } from '../app/lib/interfaces/IEnvironment';
export const environment: IEnvironment = {
production: false,
version: 'VERSION',
enableCasLogin: true,
ssrEndpoint: 'http://192.168.2.106:4000',
serverEndpoint: 'http://192.168.2.106:3010',
httpApiEndpoint: 'http://192.168.2.106:3010/api/v1',
......
......@@ -4,6 +4,7 @@ import { IEnvironment } from '../app/lib/interfaces/IEnvironment';
export const environment: IEnvironment = {
production: true,
enableCasLogin: false,
version: 'VERSION',
ssrEndpoint: 'https://test01.ars.sbzo.de',
serverEndpoint: 'https://test01.ars.sbzo.de',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment