Package com.example.lottery.util
Class AdminRoleManager
java.lang.Object
com.example.lottery.util.AdminRoleManager
Utility class to manage admin role switching state.
This allows us to detect when an entrant/organizer is actually an admin using a role profile.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclearAdminRoleSession(android.content.Context context) Clears the admin role session (call when logging out or returning to main admin).static StringgetAdminUserId(android.content.Context context) Gets the admin user ID if this is an admin role session.static booleanisAdminRoleSession(android.content.Context context) Checks if the current session is an admin using a role profile.static voidsetAdminRoleSession(android.content.Context context, String adminUserId) Marks the current session as an admin using a role profile.
-
Constructor Details
-
AdminRoleManager
public AdminRoleManager()
-
-
Method Details
-
setAdminRoleSession
Marks the current session as an admin using a role profile. Call this before navigating from AdminProfileActivity to a role. -
isAdminRoleSession
public static boolean isAdminRoleSession(android.content.Context context) Checks if the current session is an admin using a role profile. -
getAdminUserId
Gets the admin user ID if this is an admin role session. -
clearAdminRoleSession
public static void clearAdminRoleSession(android.content.Context context) Clears the admin role session (call when logging out or returning to main admin).
-