conflicts
[arvados-workbench2.git] / src / services / auth-service / auth-service.ts
index edc6e24fce752b628a7573899f21af2e6063073b..98c0321598090b11002375823fba7ffa1a374aee 100644 (file)
@@ -4,7 +4,7 @@
 
 import { User } from "~/models/user";
 import { AxiosInstance } from "axios";
-import { ApiActions, ProgressFn } from "~/services/api/api-actions";
+import { ApiActions } from "~/services/api/api-actions";
 import * as uuid from "uuid/v4";
 
 export const API_TOKEN_KEY = 'apiToken';
@@ -52,7 +52,7 @@ export class AuthService {
     }
 
     public getIsAdmin(): boolean {
-        return !!localStorage.getItem(USER_IS_ADMIN);
+        return localStorage.getItem(USER_IS_ADMIN) === 'true';
     }
 
     public getUser(): User | undefined {
@@ -61,7 +61,7 @@ export class AuthService {
         const lastName = localStorage.getItem(USER_LAST_NAME_KEY);
         const uuid = this.getUuid();
         const ownerUuid = this.getOwnerUuid();
-        const isAdmin = this.getIsAdmin();
+        const isAdmin = this.getIsAdmin();   
 
         return email && firstName && lastName && uuid && ownerUuid
             ? { email, firstName, lastName, uuid, ownerUuid, isAdmin }