[ADF-3191] Not able to login only to BPM or ECM (#3478)

* disable random test

* host setting component reset JS-API

* reload api after user prefrence change

* remove replicate reset

* missing semicolon

* deprecate provider property

* remove trailing space

* check new value before to set
This commit is contained in:
Eugenio Romano
2018-06-13 16:05:35 +01:00
committed by GitHub
parent d41e3d5b9c
commit afdedf02d1
12 changed files with 68 additions and 139 deletions

View File

@@ -29,7 +29,6 @@
<adf-login
#alfrescologin
[providers]="providers"
[fieldsValidation]="customValidation"
[disableCsrf]="disableCsrf"
[showLoginActions]="showFooter"

View File

@@ -18,7 +18,7 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { Validators } from '@angular/forms';
import { Router } from '@angular/router';
import { LogService, UserPreferencesService } from '@alfresco/adf-core';
import { LogService } from '@alfresco/adf-core';
@Component({
selector: 'app-login',
@@ -30,7 +30,6 @@ export class LoginComponent implements OnInit {
@ViewChild('alfrescologin')
alfrescologin: any;
providers = 'ECM';
customValidation: any;
disableCsrf = false;
@@ -38,7 +37,6 @@ export class LoginComponent implements OnInit {
customMinLength = 2;
constructor(private router: Router,
private userPreference: UserPreferencesService,
private logService: LogService) {
this.customValidation = {
username: ['', Validators.compose([Validators.required, Validators.minLength(this.customMinLength)])],
@@ -50,12 +48,6 @@ export class LoginComponent implements OnInit {
this.alfrescologin.addCustomValidationError('username', 'required', 'LOGIN.MESSAGES.USERNAME-REQUIRED');
this.alfrescologin.addCustomValidationError('username', 'minlength', 'LOGIN.MESSAGES.USERNAME-MIN', {minLength: this.customMinLength});
this.alfrescologin.addCustomValidationError('password', 'required', 'LOGIN.MESSAGES.PASSWORD-REQUIRED');
this.initProviders();
}
initProviders() {
this.providers = this.userPreference.providers;
}
onLogin($event) {

View File

@@ -1 +1 @@
<adf-host-settings (cancel)="onCancel()" (success)="onSuccess()" (error)="onError($event)"></adf-host-settings>
<adf-host-settings (cancel)="onCancel()" (success)="onSuccess()" (error)="onError($event)"></adf-host-settings>