Class AdminRoleManager

java.lang.Object
com.example.lottery.util.AdminRoleManager

public class AdminRoleManager extends Object
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 Details

    • AdminRoleManager

      public AdminRoleManager()
  • Method Details

    • setAdminRoleSession

      public static void setAdminRoleSession(android.content.Context context, String adminUserId)
      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

      public static String getAdminUserId(android.content.Context context)
      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).