diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2020-12-24 13:24:50 +0900 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2020-12-24 13:24:50 +0900 |
commit | 06b05b006ed7d22a69282d5dfae80c420e122b53 (patch) | |
tree | fde7c2067fa7944013a4b8470bee9f0f9cf33837 /src/app/import-attributes/import-attributes.component.ts | |
parent | 878064c437f30b6683e6414be18b19252f51184c (diff) | |
download | reclaim-ui-06b05b006ed7d22a69282d5dfae80c420e122b53.tar.gz reclaim-ui-06b05b006ed7d22a69282d5dfae80c420e122b53.zip |
settings page, experiments tweaks
Diffstat (limited to 'src/app/import-attributes/import-attributes.component.ts')
-rw-r--r-- | src/app/import-attributes/import-attributes.component.ts | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/app/import-attributes/import-attributes.component.ts b/src/app/import-attributes/import-attributes.component.ts index 4f610cb..3194490 100644 --- a/src/app/import-attributes/import-attributes.component.ts +++ b/src/app/import-attributes/import-attributes.component.ts | |||
@@ -10,7 +10,7 @@ import { IdProvider } from '../idProvider'; | |||
10 | import { LoginOptions } from 'angular-oauth2-oidc'; | 10 | import { LoginOptions } from 'angular-oauth2-oidc'; |
11 | import { Scope } from '../scope'; | 11 | import { Scope } from '../scope'; |
12 | import { LanguageService } from '../language.service'; | 12 | import { LanguageService } from '../language.service'; |
13 | 13 | import { ConfigService } from '../config.service'; | |
14 | 14 | ||
15 | @Component({ | 15 | @Component({ |
16 | selector: 'app-import-attributes', | 16 | selector: 'app-import-attributes', |
@@ -37,7 +37,8 @@ export class ImportAttributesComponent implements OnInit { | |||
37 | private router: Router, | 37 | private router: Router, |
38 | private credentialService: CredentialService, | 38 | private credentialService: CredentialService, |
39 | private oauthService: OAuthService, | 39 | private oauthService: OAuthService, |
40 | private languageService: LanguageService) { } | 40 | private languageService: LanguageService, |
41 | private configService: ConfigService) { } | ||
41 | 42 | ||
42 | 43 | ||
43 | ngOnInit(): void { | 44 | ngOnInit(): void { |
@@ -124,8 +125,12 @@ export class ImportAttributesComponent implements OnInit { | |||
124 | this.discoveringIdProvider = true; | 125 | this.discoveringIdProvider = true; |
125 | localStorage.setItem('userForCredential', this.identity.name); | 126 | localStorage.setItem('userForCredential', this.identity.name); |
126 | let account = this.webfingerEmail; | 127 | let account = this.webfingerEmail; |
127 | if (this.webfingerEmail.substr(this.webfingerEmail.indexOf('@')+1) === 'aisec.fraunhofer.de') { | 128 | if (this.configService.get().experiments) { |
128 | account = this.webfingerEmail.substr(0, this.webfingerEmail.indexOf('@')+1) + 'as.aisec.fraunhofer.de'; | 129 | if (this.webfingerEmail.substr(this.webfingerEmail.indexOf('@')+1) === 'aisec.fraunhofer.de') { |
130 | account = this.webfingerEmail.substr(0, this.webfingerEmail.indexOf('@')+1) + 'as.aisec.fraunhofer.de'; | ||
131 | } else if (this.webfingerEmail.substr(this.webfingerEmail.indexOf('@')+1) === 'bfh.ch') { | ||
132 | account = this.webfingerEmail.substr(0, this.webfingerEmail.indexOf('@')+1) + 'omejdn.nslab.ch'; | ||
133 | } | ||
129 | } | 134 | } |
130 | 135 | ||
131 | this.credentialService.getLink(account).subscribe (idProvider => { | 136 | this.credentialService.getLink(account).subscribe (idProvider => { |