mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 23:06:08 -06:00
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:
commit
bcf01c5b19
@ -674,7 +674,7 @@ class AdvsController extends PublicController
|
|||||||
$adv = $advRepository->getAdvArray($id);
|
$adv = $advRepository->getAdvArray($id);
|
||||||
|
|
||||||
|
|
||||||
if ($adv['created_by_id'] != Auth::id()) {
|
if ($adv['created_by_id'] != Auth::id() && !Auth::user()->hasRole('admin')) {
|
||||||
abort(403);
|
abort(403);
|
||||||
}
|
}
|
||||||
$cats_d = array();
|
$cats_d = array();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user