mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Use hash strategy in demo shell as the other apps (#6402)
* hash startegy * use hash in e2e * trigger build * fix * fix * remove children router overwrite crazynes * Update login.module.ts * revert not needed changes * some fixes * fix * remove fdescribe * fix * fix * Update share-file.e2e.ts * Update lock-file.e2e.ts * Update share-file.e2e.ts * some fix * some other fixes * username as id * fix after rebase * username * fix usernamee * Fix the errorComponent * Attempt to fix unit test - to check * * Fixed circular dependency error while building adf-testing package * * Fixed failing UT * fix * use username * some fixes * some fix * fix Co-authored-by: Maurizio Vitale <maurizio.vitale@alfresco.com> Co-authored-by: Vito Albano <vitoalbano@vitoalbano-mbp-0120.local> Co-authored-by: sivakumar414ram <siva.kumar@muraai.com>
This commit is contained in:
@@ -21,11 +21,11 @@ import {
|
||||
} from '@angular/core';
|
||||
import { AbstractControl, FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { Router, ActivatedRoute, Params } from '@angular/router';
|
||||
import { Location } from '@angular/common';
|
||||
import { AuthenticationService } from '../../services/authentication.service';
|
||||
import { LogService } from '../../services/log.service';
|
||||
import { TranslationService } from '../../services/translation.service';
|
||||
import { UserPreferencesService } from '../../services/user-preferences.service';
|
||||
import { AlfrescoApiService } from '../../services/alfresco-api.service';
|
||||
|
||||
import { LoginErrorEvent } from '../models/login-error.event';
|
||||
import { LoginSubmitEvent } from '../models/login-submit.event';
|
||||
@@ -139,10 +139,11 @@ export class LoginComponent implements OnInit, OnDestroy {
|
||||
private router: Router,
|
||||
private appConfig: AppConfigService,
|
||||
private userPreferences: UserPreferencesService,
|
||||
private location: Location,
|
||||
private route: ActivatedRoute,
|
||||
private sanitizer: DomSanitizer
|
||||
) {}
|
||||
private sanitizer: DomSanitizer,
|
||||
private alfrescoApiService: AlfrescoApiService
|
||||
) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.initFormError();
|
||||
@@ -154,10 +155,14 @@ export class LoginComponent implements OnInit, OnDestroy {
|
||||
if (oauth && oauth.implicitFlow) {
|
||||
this.implicitFlow = true;
|
||||
}
|
||||
|
||||
if (oauth && oauth.silentLogin && !this.authService.isLoggedIn()) {
|
||||
this.alfrescoApiService.getInstance().oauth2Auth.implicitLogin();
|
||||
}
|
||||
}
|
||||
|
||||
if (this.authService.isEcmLoggedIn() || this.authService.isBpmLoggedIn()) {
|
||||
this.location.forward();
|
||||
if (this.authService.isLoggedIn()) {
|
||||
this.router.navigate([this.successRoute]);
|
||||
} else {
|
||||
this.route.queryParams.subscribe((params: Params) => {
|
||||
const url = params['redirectUrl'];
|
||||
@@ -204,6 +209,9 @@ export class LoginComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
implicitLogin() {
|
||||
if (this.authService.isLoggedIn()) {
|
||||
this.router.navigate([this.successRoute]);
|
||||
}
|
||||
this.authService.ssoImplicitLogin();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user