Completely refactored guard to take into account the Rbac container