mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
Register the accessories.files ability and allow users with the ability to upload files for accessories
This commit is contained in:
parent
1fef992fa8
commit
6c89f08193
|
@ -114,6 +114,12 @@ class AuthServiceProvider extends ServiceProvider
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Gate::define('accessories.files', function ($user) {
|
||||||
|
if ($user->hasAccess('accessories.files')) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Gate::define('components.files', function ($user) {
|
Gate::define('components.files', function ($user) {
|
||||||
if ($user->hasAccess('components.files')) {
|
if ($user->hasAccess('components.files')) {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -84,8 +84,7 @@
|
||||||
</li>
|
</li>
|
||||||
@endcan
|
@endcan
|
||||||
|
|
||||||
@can('update', Component::class)
|
@can('update', \App\Models\Accessory::class)
|
||||||
|
|
||||||
<li class="pull-right">
|
<li class="pull-right">
|
||||||
<a href="#" data-toggle="modal" data-target="#uploadFileModal">
|
<a href="#" data-toggle="modal" data-target="#uploadFileModal">
|
||||||
<i class="fas fa-paperclip" aria-hidden="true"></i> {{ trans('button.upload') }}
|
<i class="fas fa-paperclip" aria-hidden="true"></i> {{ trans('button.upload') }}
|
||||||
|
|
Loading…
Reference in a new issue