Add menu item visibility logic with test cases for new controller methods.