[ACS-827] - added whitelisted element and method for checking them (#6329)

* [ACS-827] - added whitelisted element and method for checking them

* [ACS-827] - changed method name with clear one

* [ACS-827] - pr review changes

Co-authored-by: Vito Albano <vitoalbano@vitoalbano-mbp-0120.local>
This commit is contained in:
Vito
2020-11-10 09:55:21 +00:00
committed by GitHub
parent dab85c0c43
commit 7eda1bcad5

View File

@@ -48,6 +48,8 @@ export class AlfrescoApiService {
lastConfig: AlfrescoApiConfig; lastConfig: AlfrescoApiConfig;
private excludedErrorUrl: string[] = ['api/enterprise/system/properties'];
getInstance(): AlfrescoApiCompatibility { getInstance(): AlfrescoApiCompatibility {
return this.alfrescoApi; return this.alfrescoApi;
} }
@@ -152,4 +154,9 @@ export class AlfrescoApiService {
isDifferentConfig(lastConfig: AlfrescoApiConfig, newConfig: AlfrescoApiConfig) { isDifferentConfig(lastConfig: AlfrescoApiConfig, newConfig: AlfrescoApiConfig) {
return JSON.stringify(lastConfig) !== JSON.stringify(newConfig); return JSON.stringify(lastConfig) !== JSON.stringify(newConfig);
} }
isExcludedErrorListener(currentFullPath: string): boolean {
const formattedPath = currentFullPath.replace(this.lastConfig.hostBpm + '/' + this.lastConfig.contextRootBpm, '');
return this.excludedErrorUrl.includes(formattedPath);
}
} }