Refactored security guard role checks