goldenChat base source add
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package com.goldenchart.auth;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public final class MenuIds {
|
||||
|
||||
private MenuIds() {}
|
||||
|
||||
public static final List<String> ALL = List.of(
|
||||
"dashboard", "chart", "paper", "strategy", "backtest", "notifications", "settings",
|
||||
"settings_general", "settings_chart", "settings_indicators", "settings_backtest",
|
||||
"settings_strategy", "settings_paper", "settings_alert", "settings_network", "settings_admin"
|
||||
);
|
||||
}
|
||||
@@ -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