role validation and flash message