X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Fservices%2FAuthInterceptorService.ts;h=8c5a9d758d305b20bd295b05051955b3f953d588;hb=8c89de764cfca61d3bb2d17cdacd8bc4de48de8d;hp=4a66482261af3d020c6343b645296e15a97d1f45;hpb=b5673d092bcae39b5315532b1e034dbf02a8c294;p=osm%2FNG-UI.git diff --git a/src/services/AuthInterceptorService.ts b/src/services/AuthInterceptorService.ts index 4a66482..8c5a9d7 100644 --- a/src/services/AuthInterceptorService.ts +++ b/src/services/AuthInterceptorService.ts @@ -93,8 +93,12 @@ export class AuthInterceptorService implements HttpInterceptor { }); } else { this.clonedReq = req.clone({ - setHeaders: { Authorization: 'Bearer ' + idToken, 'Content-Type': 'charset=UTF-8', - 'Cache-Control': 'no-cache', Pragma: 'no-cache' } + setHeaders: { + Authorization: 'Bearer ' + idToken, + 'Content-Type': 'charset=UTF-8', + 'Cache-Control': 'no-cache', + Pragma: 'no-cache' + } }); } } @@ -119,7 +123,7 @@ export class AuthInterceptorService implements HttpInterceptor { /** Method to handle 401, 403 & 502 error */ private handleError(err: HttpErrorResponse): void { - if (err.error.detail !== 'Access denied: lack of permissions.') { + if (err.error.detail !== 'Access denied: lack of permissions.' && err.error.detail !== 'You cannot remove system_admin role from admin user') { this.notifierService.hideAll(); this.authService.logoutResponse(); if (this.authService.handle401) {