Merge pull request #131 from openclassify/diatrex1

#125 can't edit the ad unless you are logged in with the ad profile
This commit is contained in:
Fatih Alp 2019-10-31 13:53:53 +03:00 committed by GitHub
commit bcf01c5b19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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();