Merge branch 'fix-login-as-student' of s416084/find-my-tutor-android into develop
This commit is contained in:
commit
3177b43f26
@ -182,7 +182,9 @@ public class LoginActivity extends AppCompatActivity {
|
|||||||
Claim userId = jwt.getClaim("nameid");
|
Claim userId = jwt.getClaim("nameid");
|
||||||
Claim role = jwt.getClaim("http://schemas.microsoft.com/ws/2008/06/identity/claims/role");
|
Claim role = jwt.getClaim("http://schemas.microsoft.com/ws/2008/06/identity/claims/role");
|
||||||
|
|
||||||
if(!Objects.requireNonNull(role.asString()).equals("Student")){
|
if(Objects.requireNonNull(role.asString()).equals("Student")){
|
||||||
|
PrefUtils.storeIsTutor(getApplicationContext(), false);
|
||||||
|
}else{
|
||||||
PrefUtils.storeIsTutor(getApplicationContext(), true);
|
PrefUtils.storeIsTutor(getApplicationContext(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user