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';
|
TYPE: string = 'BPM';
|
||||||
|
|
||||||
constructor(private alfrescoSettingsService: AlfrescoSettingsService,
|
constructor(alfrescoSetting: AlfrescoSettingsService,
|
||||||
private http: Http) {
|
http: Http) {
|
||||||
super(alfrescoSettingsService, http);
|
super(alfrescoSetting, http);
|
||||||
}
|
}
|
||||||
|
|
||||||
getHost(): string {
|
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) {
|
private apiActivitiLogin(username: string, password: string) {
|
||||||
let url = this.alfrescoSettingsService.getBPMApiBaseUrl() + '/app/authentication';
|
let url = this.alfrescoSetting.getBPMApiBaseUrl() + '/app/authentication';
|
||||||
let headers = new Headers({
|
let headers = new Headers({
|
||||||
'Content-Type': 'application/x-www-form-urlencoded'
|
'Content-Type': 'application/x-www-form-urlencoded'
|
||||||
});
|
});
|
||||||
@ -91,7 +91,7 @@ export class AlfrescoAuthenticationBPM extends AlfrescoAuthenticationBase implem
|
|||||||
}
|
}
|
||||||
|
|
||||||
private apiActivitiLogout() {
|
private apiActivitiLogout() {
|
||||||
let url = this.alfrescoSettingsService.getBPMApiBaseUrl() + '/app/logout';
|
let url = this.alfrescoSetting.getBPMApiBaseUrl() + '/app/logout';
|
||||||
return this.http.get(url).toPromise();
|
return this.http.get(url).toPromise();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,15 +25,13 @@ export class AlfrescoAuthenticationBase {
|
|||||||
|
|
||||||
alfrescoApi: any;
|
alfrescoApi: any;
|
||||||
|
|
||||||
private alfrescoSetting: AlfrescoSettingsService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
* @param alfrescoSettingsService
|
* @param alfrescoSettingsService
|
||||||
*/
|
*/
|
||||||
constructor(alfrescoSettingsService: AlfrescoSettingsService,
|
constructor(public alfrescoSetting: AlfrescoSettingsService,
|
||||||
http: Http) {
|
public http: Http) {
|
||||||
this.alfrescoSetting = alfrescoSettingsService;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -31,12 +31,12 @@ export class AlfrescoAuthenticationECM extends AlfrescoAuthenticationBase implem
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
* @param alfrescoSettingsService
|
* @param alfrescoSetting
|
||||||
* @param http
|
* @param http
|
||||||
*/
|
*/
|
||||||
constructor(private alfrescoSettingsService: AlfrescoSettingsService,
|
constructor(alfrescoSetting: AlfrescoSettingsService,
|
||||||
private http: Http) {
|
http: Http) {
|
||||||
super(alfrescoSettingsService, http);
|
super(alfrescoSetting, http);
|
||||||
|
|
||||||
if (!this.isLoggedIn) {
|
if (!this.isLoggedIn) {
|
||||||
this.alfrescoApi = new AlfrescoApi({
|
this.alfrescoApi = new AlfrescoApi({
|
||||||
@ -51,7 +51,7 @@ export class AlfrescoAuthenticationECM extends AlfrescoAuthenticationBase implem
|
|||||||
}
|
}
|
||||||
|
|
||||||
getHost(): string {
|
getHost(): string {
|
||||||
return this.alfrescoSettingsService.ecmHost;
|
return this.alfrescoSetting.ecmHost;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -35,13 +35,13 @@ export class AlfrescoAuthenticationService extends AlfrescoAuthenticationBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
* @param alfrescoSettingsService
|
* @param alfrescoSetting
|
||||||
* @param http
|
* @param http
|
||||||
*/
|
*/
|
||||||
constructor(private alfrescoSettingsService: AlfrescoSettingsService,
|
constructor(alfrescoSetting: AlfrescoSettingsService,
|
||||||
private http: Http) {
|
http: Http) {
|
||||||
super(alfrescoSettingsService, http);
|
super(alfrescoSetting, http);
|
||||||
this.createProviderInstance(this.alfrescoSettingsService.getProviders());
|
this.createProviderInstance(alfrescoSetting.getProviders());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -175,7 +175,7 @@ export class AlfrescoAuthenticationService extends AlfrescoAuthenticationBase {
|
|||||||
if (this.providersInstance.length === 0) {
|
if (this.providersInstance.length === 0) {
|
||||||
providers.forEach((provider) => {
|
providers.forEach((provider) => {
|
||||||
let authInstance: AbstractAuthentication = AuthenticationFactory.createAuth(
|
let authInstance: AbstractAuthentication = AuthenticationFactory.createAuth(
|
||||||
this.alfrescoSettingsService, this.http, provider);
|
this.alfrescoSetting, this.http, provider);
|
||||||
if (authInstance) {
|
if (authInstance) {
|
||||||
this.providersInstance.push(authInstance);
|
this.providersInstance.push(authInstance);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user