mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
The alfrescoSetting property is present twice
This commit is contained in:
parent
b6626e1c20
commit
b15ea3c6d4
@ -25,13 +25,13 @@ export class AlfrescoAuthenticationBPM extends AlfrescoAuthenticationBase implem
|
||||
|
||||
TYPE: string = 'BPM';
|
||||
|
||||
constructor(private alfrescoSettingsService: AlfrescoSettingsService,
|
||||
private http: Http) {
|
||||
super(alfrescoSettingsService, http);
|
||||
constructor(alfrescoSetting: AlfrescoSettingsService,
|
||||
http: Http) {
|
||||
super(alfrescoSetting, http);
|
||||
}
|
||||
|
||||
getHost(): string {
|
||||
return this.alfrescoSettingsService.bpmHost;
|
||||
return this.alfrescoSetting.bpmHost;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -75,7 +75,7 @@ export class AlfrescoAuthenticationBPM extends AlfrescoAuthenticationBase implem
|
||||
}
|
||||
|
||||
private apiActivitiLogin(username: string, password: string) {
|
||||
let url = this.alfrescoSettingsService.getBPMApiBaseUrl() + '/app/authentication';
|
||||
let url = this.alfrescoSetting.getBPMApiBaseUrl() + '/app/authentication';
|
||||
let headers = new Headers({
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
});
|
||||
@ -91,7 +91,7 @@ export class AlfrescoAuthenticationBPM extends AlfrescoAuthenticationBase implem
|
||||
}
|
||||
|
||||
private apiActivitiLogout() {
|
||||
let url = this.alfrescoSettingsService.getBPMApiBaseUrl() + '/app/logout';
|
||||
let url = this.alfrescoSetting.getBPMApiBaseUrl() + '/app/logout';
|
||||
return this.http.get(url).toPromise();
|
||||
}
|
||||
|
||||
|
@ -25,15 +25,13 @@ export class AlfrescoAuthenticationBase {
|
||||
|
||||
alfrescoApi: any;
|
||||
|
||||
private alfrescoSetting: AlfrescoSettingsService;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param alfrescoSettingsService
|
||||
*/
|
||||
constructor(alfrescoSettingsService: AlfrescoSettingsService,
|
||||
http: Http) {
|
||||
this.alfrescoSetting = alfrescoSettingsService;
|
||||
constructor(public alfrescoSetting: AlfrescoSettingsService,
|
||||
public http: Http) {
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -31,12 +31,12 @@ export class AlfrescoAuthenticationECM extends AlfrescoAuthenticationBase implem
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param alfrescoSettingsService
|
||||
* @param alfrescoSetting
|
||||
* @param http
|
||||
*/
|
||||
constructor(private alfrescoSettingsService: AlfrescoSettingsService,
|
||||
private http: Http) {
|
||||
super(alfrescoSettingsService, http);
|
||||
constructor(alfrescoSetting: AlfrescoSettingsService,
|
||||
http: Http) {
|
||||
super(alfrescoSetting, http);
|
||||
|
||||
if (!this.isLoggedIn) {
|
||||
this.alfrescoApi = new AlfrescoApi({
|
||||
@ -51,7 +51,7 @@ export class AlfrescoAuthenticationECM extends AlfrescoAuthenticationBase implem
|
||||
}
|
||||
|
||||
getHost(): string {
|
||||
return this.alfrescoSettingsService.ecmHost;
|
||||
return this.alfrescoSetting.ecmHost;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -35,13 +35,13 @@ export class AlfrescoAuthenticationService extends AlfrescoAuthenticationBase {
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param alfrescoSettingsService
|
||||
* @param alfrescoSetting
|
||||
* @param http
|
||||
*/
|
||||
constructor(private alfrescoSettingsService: AlfrescoSettingsService,
|
||||
private http: Http) {
|
||||
super(alfrescoSettingsService, http);
|
||||
this.createProviderInstance(this.alfrescoSettingsService.getProviders());
|
||||
constructor(alfrescoSetting: AlfrescoSettingsService,
|
||||
http: Http) {
|
||||
super(alfrescoSetting, http);
|
||||
this.createProviderInstance(alfrescoSetting.getProviders());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -175,7 +175,7 @@ export class AlfrescoAuthenticationService extends AlfrescoAuthenticationBase {
|
||||
if (this.providersInstance.length === 0) {
|
||||
providers.forEach((provider) => {
|
||||
let authInstance: AbstractAuthentication = AuthenticationFactory.createAuth(
|
||||
this.alfrescoSettingsService, this.http, provider);
|
||||
this.alfrescoSetting, this.http, provider);
|
||||
if (authInstance) {
|
||||
this.providersInstance.push(authInstance);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user