conflicts
[arvados-workbench2.git] / src / services / auth-service / auth-service.ts
index 8221e489de7f8b63a6e1569596cabbc48d70f1ad..98c0321598090b11002375823fba7ffa1a374aee 100644 (file)
@@ -52,17 +52,16 @@ export class AuthService {
     }
 
     public getIsAdmin(): boolean {
-        return !!localStorage.getItem(USER_IS_ADMIN);
+        return localStorage.getItem(USER_IS_ADMIN) === 'true';
     }
 
     public getUser(): User | undefined {
         const email = localStorage.getItem(USER_EMAIL_KEY);
         const firstName = localStorage.getItem(USER_FIRST_NAME_KEY);
         const lastName = localStorage.getItem(USER_LAST_NAME_KEY);
-        const uuid = localStorage.getItem(USER_UUID_KEY);
-        const ownerUuid = localStorage.getItem(USER_OWNER_UUID_KEY);
-        const isAdmin = this.getIsAdmin();
-        console.log(isAdmin);
+        const uuid = this.getUuid();
+        const ownerUuid = this.getOwnerUuid();
+        const isAdmin = this.getIsAdmin();   
 
         return email && firstName && lastName && uuid && ownerUuid
             ? { email, firstName, lastName, uuid, ownerUuid, isAdmin }