We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 456d752 commit df92e6fCopy full SHA for df92e6f
1 file changed
domain/src/main/java/com/threegap/bitnagil/domain/auth/model/UserRole.kt
@@ -3,6 +3,9 @@ package com.threegap.bitnagil.domain.auth.model
3
enum class UserRole {
4
USER,
5
GUEST,
6
+ ONBOARDING,
7
+ WITHDRAWN,
8
+ UNKNOWN,
9
;
10
11
fun isGuest() = this == GUEST
@@ -12,7 +15,9 @@ enum class UserRole {
12
15
when (value) {
13
16
"USER" -> USER
14
17
"GUEST" -> GUEST
- else -> throw IllegalArgumentException("Unknown role: $value")
18
+ "ONBOARDING" -> ONBOARDING
19
+ "WITHDRAWN" -> WITHDRAWN
20
+ else -> UNKNOWN
21
}
22
23
0 commit comments