Merge branch '14503_keep_services_panel'
[arvados.git] / src / services / auth-service / auth-service.ts
index dd63de0961dd4873e53e9e4fee61a465281f33c4..69e3a79d6a3ffc26db9a10214a3da89ea020f57e 100644 (file)
@@ -52,15 +52,15 @@ 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 uuid = this.getUuid();
+        const ownerUuid = this.getOwnerUuid();
         const isAdmin = this.getIsAdmin();
 
         return email && firstName && lastName && uuid && ownerUuid
@@ -103,7 +103,6 @@ export class AuthService {
             .get<UserDetailsResponse>('/users/current')
             .then(resp => {
                 this.actions.progressFn(reqId, false);
-                console.log('user:', resp.data);
                 return {
                     email: resp.data.email,
                     firstName: resp.data.first_name,