mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[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:
@@ -29,7 +29,6 @@
|
||||
|
||||
<adf-login
|
||||
#alfrescologin
|
||||
[providers]="providers"
|
||||
[fieldsValidation]="customValidation"
|
||||
[disableCsrf]="disableCsrf"
|
||||
[showLoginActions]="showFooter"
|
||||
|
@@ -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) {
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user