goldenChat base source add
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package com.goldenchart.auth;
|
||||
|
||||
public enum UserRole {
|
||||
ADMIN,
|
||||
USER,
|
||||
GUEST;
|
||||
|
||||
public static UserRole fromString(String value) {
|
||||
if (value == null || value.isBlank()) return USER;
|
||||
try {
|
||||
return UserRole.valueOf(value.trim().toUpperCase());
|
||||
} catch (IllegalArgumentException e) {
|
||||
return USER;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user