FEATURE: hopefully last changes about permissions
This commit is contained in:
@@ -20,7 +20,7 @@ class TemplatePolicy extends BasicPolicy
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function copy(User $user, Template $template)
|
||||
public function copy(User $user)
|
||||
{
|
||||
return $user->hasAbility('copy-templates');
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
{{str_limit($template->description, 150)}}
|
||||
</div>
|
||||
|
||||
@can('copy', $template)
|
||||
@can('copy', \App\Models\Templates\Template::class)
|
||||
@if($isWritable)
|
||||
<a data-template-id="{{$template->id}}" data-template-name="{{$template->template_name}}"
|
||||
class="btn btn-pill-left btn-secondary col-lg-6 copy-template" data-toggle="tooltip"
|
||||
@@ -21,11 +21,6 @@
|
||||
<i class="fa fa-copy"></i>
|
||||
</a>
|
||||
@endif
|
||||
@else
|
||||
<a href="#" class="btn btn-pill-left btn-secondary disabled col-lg-6" data-toggle="tooltip"
|
||||
title="@lang('admin/templates.cannotCopy')">
|
||||
<i class="fa fa-copy"></i>
|
||||
</a>
|
||||
@endcan
|
||||
@can('update', $template)
|
||||
<a href="{{route('templates.edit', ['id' => $template->id])}}"
|
||||
|
||||
@@ -112,13 +112,12 @@
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
|
||||
@can('manage', \App\Models\ActionLog\ActionLog::class)
|
||||
<div class="text-center">
|
||||
<a href="{{route('log.overview', ['userId' => $user->id])}}"
|
||||
class="btn btn-secondary">@lang('admin/userManagement.moreUserActions')</a>
|
||||
</div>
|
||||
|
||||
|
||||
@endcan
|
||||
@else
|
||||
<div class="alert alert-info">
|
||||
<em>@lang('admin/userManagement.noActions')</em>
|
||||
|
||||
Reference in New Issue
Block a user