[ADF-3912] Setting Component - Return as default BASIC authType (#3495)

* Return as default BASIC authType

* remove the commented line
This commit is contained in:
Maurizio Vitale 2018-06-18 10:53:57 +01:00 committed by Eugenio Romano
parent 5b3fb4856d
commit ae73839e56
2 changed files with 6 additions and 5 deletions

View File

@ -117,8 +117,7 @@ export class AlfrescoApiService {
} }
protected initAlfrescoApi() { protected initAlfrescoApi() {
let oauth: OauthConfigModel = this.appConfig.get<OauthConfigModel>(AppConfigValues.OAUTHCONFIG, null); let oauth: OauthConfigModel = Object.assign({}, this.appConfig.get<OauthConfigModel>(AppConfigValues.OAUTHCONFIG, null));
if (oauth) { if (oauth) {
oauth.redirectUri = window.location.origin + (oauth.redirectUri || '/'); oauth.redirectUri = window.location.origin + (oauth.redirectUri || '/');
oauth.redirectUriLogout = window.location.origin + (oauth.redirectUriLogout || '/'); oauth.redirectUriLogout = window.location.origin + (oauth.redirectUriLogout || '/');
@ -130,7 +129,7 @@ export class AlfrescoApiService {
ticketBpm: this.storage.getItem('ticket-BPM'), ticketBpm: this.storage.getItem('ticket-BPM'),
hostEcm: this.appConfig.get<string>(AppConfigValues.ECMHOST), hostEcm: this.appConfig.get<string>(AppConfigValues.ECMHOST),
hostBpm: this.appConfig.get<string>(AppConfigValues.BPMHOST), hostBpm: this.appConfig.get<string>(AppConfigValues.BPMHOST),
authType: this.appConfig.get<string>(AppConfigValues.AUTHTYPE), authType: this.appConfig.get<string>(AppConfigValues.AUTHTYPE, 'BASIC'),
contextRootBpm: this.appConfig.get<string>(AppConfigValues.CONTEXTROOTBPM), contextRootBpm: this.appConfig.get<string>(AppConfigValues.CONTEXTROOTBPM),
contextRoot: this.appConfig.get<string>(AppConfigValues.CONTEXTROOTECM), contextRoot: this.appConfig.get<string>(AppConfigValues.CONTEXTROOTECM),
disableCsrf: this.storage.getItem('DISABLE_CSRF') === 'true', disableCsrf: this.storage.getItem('DISABLE_CSRF') === 'true',

View File

@ -79,14 +79,16 @@ export class HostSettingsComponent implements OnInit {
let providerSelected = this.appConfig.get<string>(AppConfigValues.PROVIDERS); let providerSelected = this.appConfig.get<string>(AppConfigValues.PROVIDERS);
const authType = this.appConfig.get<string>(AppConfigValues.AUTHTYPE, 'BASIC');
this.form = this.formBuilder.group({ this.form = this.formBuilder.group({
providersControl: [providerSelected, Validators.required], providersControl: [providerSelected, Validators.required],
authType: this.appConfig.get<string>(AppConfigValues.AUTHTYPE) authType: authType
}); });
this.addFormGroups(); this.addFormGroups();
if (this.appConfig.get<string>(AppConfigValues.AUTHTYPE) === 'OAUTH') { if (authType === 'OAUTH') {
this.addOAuthFormGroup(); this.addOAuthFormGroup();
} }