diff options
Diffstat (limited to 'client/src/app/menu/menu.component.ts')
-rw-r--r-- | client/src/app/menu/menu.component.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/client/src/app/menu/menu.component.ts b/client/src/app/menu/menu.component.ts index 63f01df92..fc6d74cff 100644 --- a/client/src/app/menu/menu.component.ts +++ b/client/src/app/menu/menu.component.ts | |||
@@ -1,6 +1,7 @@ | |||
1 | import { HotkeysService } from 'angular2-hotkeys' | 1 | import { HotkeysService } from 'angular2-hotkeys' |
2 | import * as debug from 'debug' | 2 | import * as debug from 'debug' |
3 | import { switchMap } from 'rxjs/operators' | 3 | import { switchMap } from 'rxjs/operators' |
4 | import { environment } from 'src/environments/environment' | ||
4 | import { ViewportScroller } from '@angular/common' | 5 | import { ViewportScroller } from '@angular/common' |
5 | import { Component, OnInit, ViewChild } from '@angular/core' | 6 | import { Component, OnInit, ViewChild } from '@angular/core' |
6 | import { Router } from '@angular/router' | 7 | import { Router } from '@angular/router' |
@@ -91,6 +92,10 @@ export class MenuComponent implements OnInit { | |||
91 | return this.languageChooserModal.getCurrentLanguage() | 92 | return this.languageChooserModal.getCurrentLanguage() |
92 | } | 93 | } |
93 | 94 | ||
95 | get requiresApproval () { | ||
96 | return this.serverConfig.signup.requiresApproval | ||
97 | } | ||
98 | |||
94 | ngOnInit () { | 99 | ngOnInit () { |
95 | this.htmlServerConfig = this.serverService.getHTMLConfig() | 100 | this.htmlServerConfig = this.serverService.getHTMLConfig() |
96 | this.currentInterfaceLanguage = this.languageChooserModal.getCurrentLanguage() | 101 | this.currentInterfaceLanguage = this.languageChooserModal.getCurrentLanguage() |
@@ -131,12 +136,7 @@ export class MenuComponent implements OnInit { | |||
131 | } | 136 | } |
132 | 137 | ||
133 | getExternalLoginHref () { | 138 | getExternalLoginHref () { |
134 | if (!this.serverConfig || this.serverConfig.client.menu.login.redirectOnSingleExternalAuth !== true) return undefined | 139 | return PluginsManager.getDefaultLoginHref(environment.apiUrl, this.serverConfig) |
135 | |||
136 | const externalAuths = this.serverConfig.plugin.registeredExternalAuths | ||
137 | if (externalAuths.length !== 1) return undefined | ||
138 | |||
139 | return PluginsManager.getExternalAuthHref(externalAuths[0]) | ||
140 | } | 140 | } |
141 | 141 | ||
142 | isRegistrationAllowed () { | 142 | isRegistrationAllowed () { |