#125 can't edit the ad unless you are logged in with the ad profile

This commit is contained in:
Diatrex 2019-10-31 12:02:52 +03:00
parent 5b04e32550
commit 1fe399a1d1

View File

@ -674,7 +674,7 @@ class AdvsController extends PublicController
$adv = $advRepository->getAdvArray($id);
if ($adv['created_by_id'] != Auth::id()) {
if ($adv['created_by_id'] != Auth::id() && !Auth::user()->hasRole('admin')) {
abort(403);
}
$cats_d = array();