From b75e3e5ae3f0aba9da897da093d4596149a16d2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mieszko=20Wrzeszczy=C5=84ski?= Date: Wed, 21 Nov 2018 08:37:23 +0100 Subject: [PATCH] Improve logging --- .../com/uam/wmi/findmytutor/activity/LoginActivity.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/uam/wmi/findmytutor/activity/LoginActivity.java b/app/src/main/java/com/uam/wmi/findmytutor/activity/LoginActivity.java index 301c6fa..912598a 100644 --- a/app/src/main/java/com/uam/wmi/findmytutor/activity/LoginActivity.java +++ b/app/src/main/java/com/uam/wmi/findmytutor/activity/LoginActivity.java @@ -182,12 +182,10 @@ public class LoginActivity extends AppCompatActivity { Claim userId = jwt.getClaim("nameid"); Claim role = jwt.getClaim("http://schemas.microsoft.com/ws/2008/06/identity/claims/role"); - if(Objects.requireNonNull(role.asString()).equals("Student")){ - PrefUtils.storeIsTutor(getApplicationContext(), false); + if(!Objects.requireNonNull(role.asString()).equals("Student")){ + PrefUtils.storeIsTutor(getApplicationContext(), true); } - - Log.e("LOGOWANIE",role.asString()); - + PrefUtils.storeIsLoggedIn(getApplicationContext(), true); PrefUtils.storeApiKey(getApplicationContext(), token); PrefUtils.storeUserId(getApplicationContext(), userId.asString()); -- 2.20.1