diff --git a/src/client/src/FrontPage.js b/src/client/src/FrontPage.js index 062d5ea..6321fea 100644 --- a/src/client/src/FrontPage.js +++ b/src/client/src/FrontPage.js @@ -224,7 +224,9 @@ class LoginManager { } isLoggedIn() { - return this.user.googleId !== undefined && this.user.googleId !== "" && this.user.asuraId !== undefined && this.user.asuraId !== -1; + let loggedIn = this.user.googleId !== "" && this.user.asuraId !== -1; + console.log(loggedIn); + return loggedIn; } isManager() { return this.isLoggedIn() && this.user.isManager; diff --git a/src/client/src/ProfilePage.js b/src/client/src/ProfilePage.js index 4a9b09c..39bdd3d 100644 --- a/src/client/src/ProfilePage.js +++ b/src/client/src/ProfilePage.js @@ -21,7 +21,7 @@ export default function ProfilePage(props) {

Name: {user.name}

Email: {user.email}

-

Role: {user.isManager() ? "Manager" : "Administrator"}

+

Role: {props.login.isManager() ? "Manager" : "Administrator"}

Picture: Your profile