guest()) { return Response::json(array('error' => 'you are not allowed to perform this operation')); } if(!Auth::user()->isOpenstackIdAdmin()) { return Response::json(array('error' => 'you are not allowed to perform this operation')); } return $next($request); } }