Class AdminAccessDeniedException

All Implemented Interfaces:
Serializable

@ResponseStatus(FORBIDDEN) public class AdminAccessDeniedException extends RuntimeException
Thrown when a user attempts to perform an action requiring admin privileges but does not have the necessary permissions.
See Also:
  • Constructor Details

    • AdminAccessDeniedException

      public AdminAccessDeniedException(Long groupId, Long userId)
      Constructs a new AdminAccessDeniedException for a specific user and group.
      Parameters:
      groupId - the ID of the group the user tried to access
      userId - the ID of the user who lacks admin privileges
    • AdminAccessDeniedException

      public AdminAccessDeniedException(String message)
      Constructs a new AdminAccessDeniedException with a custom message.
      Parameters:
      message - the detail message