Bug 1414 - Is not possible to remove all role-mappings of a user

 * Able remove the project role mapping

Change-Id: I68ec168d18675434faf98b57a34183ac06cafb60
Signed-off-by: Barath Kumar R <barath.r@tataelxsi.co.in>
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 @@
             });
         } 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 @@
 
     /** 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) {