mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
parent
c3c63c1820
commit
94af6de8c1
@ -1,4 +1,4 @@
|
||||
{% if app.auth.id == adv.created_by_id %}
|
||||
{% if auth_user().id == adv.created_by_id or auth_user().hasPermission('visiosoft.module.advs::advs.write') %}
|
||||
<div class="btn-group dropleft dropleft-edit position-fixed">
|
||||
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{{ trans('visiosoft.module.advs::field.ad_actions') }}
|
||||
|
||||
@ -642,8 +642,8 @@ class AdvsController extends PublicController
|
||||
$isActive = new AdvModel();
|
||||
$adv = $advRepository->getAdvArray($id);
|
||||
|
||||
|
||||
if ($adv['created_by_id'] != Auth::id() && !Auth::user()->hasRole('admin')) {
|
||||
if ($adv['created_by_id'] != auth()->id()
|
||||
&& !auth()->user()->hasPermission('visiosoft.module.advs::advs.write')) {
|
||||
abort(403);
|
||||
}
|
||||
$cats_d = array();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user