Skip to content

Commit

Permalink
Whitelisted e-mail [email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
s1g53gv committed Dec 20, 2023
1 parent 367e84c commit da236f5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/src/main/java/it/bz/noi/community/oauth/AuthManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ object AuthManager {

fun String.isDimensionEmail() = endsWith("@dimension.it")

fun String.isGooglePlayReviewEmail() = this == "[email protected]"

fun String.isWhitelisted() = isDimensionEmail() || isGooglePlayReviewEmail()

return try {
val token = obtainFreshToken() ?: return false
val mail: String = getUserInfo(token, obtainAuthServiceConfig()).let { res ->
Expand All @@ -85,7 +89,7 @@ object AuthManager {
}
}?.email ?: return false

if (mail.isDimensionEmail()) {
if (mail.isWhitelisted()) {
return true
}

Expand Down

0 comments on commit da236f5

Please sign in to comment.