@alfresco/aca-shared 7.5.0-26747462401 → 7.5.0-26871545181
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -21,6 +21,7 @@ import { MatButtonModule } from '@angular/material/button';
|
|
|
21
21
|
import * as i3 from '@angular/material/icon';
|
|
22
22
|
import { MatIconModule, MatIconRegistry } from '@angular/material/icon';
|
|
23
23
|
import { A11yModule } from '@angular/cdk/a11y';
|
|
24
|
+
import { minimatch } from 'minimatch';
|
|
24
25
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
25
26
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
26
27
|
import * as i2$1 from '@angular/material/menu';
|
|
@@ -1234,7 +1235,9 @@ class AppService {
|
|
|
1234
1235
|
init() {
|
|
1235
1236
|
this.alfrescoApiService.getInstance().on('error', (error) => {
|
|
1236
1237
|
if (error.status === 401 && !this.alfrescoApiService.isExcludedErrorListener(error?.response?.req?.url)) {
|
|
1237
|
-
|
|
1238
|
+
const publicUrls = this.config.get('oauth2.publicUrls', []);
|
|
1239
|
+
const isPublicUrl = publicUrls.some((pattern) => minimatch(this.router.url, pattern));
|
|
1240
|
+
if (!this.authenticationService.isLoggedIn() && !isPublicUrl) {
|
|
1238
1241
|
this.matDialog.closeAll();
|
|
1239
1242
|
let redirectUrl = this.activatedRoute.snapshot.queryParams['redirectUrl'];
|
|
1240
1243
|
if (!redirectUrl) {
|