When you perform delete operation in grid view it made an ajax request where form will not be submitted, that’s why you get popup error message instead redirection.but the message correctly says that you do not have permission to perform the action.You can use below options to handle this error nicely.
catch the exception in delete action and throw proper error message.
in your actionDelete do below modifications.
try
{
$model = $this->loadModel($id);
$model->delete() ;
}
catch (Exception $e)
{
if (isset($_GET['ajax']))
{
throw new CHttpException(400, 'You do not have permission to perform this action');
}
}
// by evaluation $e you can track the correct exception associated with permission
By adding below to grid view you can disable ajax submission then page will be redirected to error page as you expected.