Merge remote-tracking branch 'origin/develop'
This commit is contained in:
@@ -32,7 +32,7 @@ class UploadedFilesController extends Controller
|
||||
|
||||
// Check the permissions to make sure the user can view the object
|
||||
$object = self::$map_object_type[$object_type]::withTrashed()->find($id);
|
||||
$this->authorize('view', $object);
|
||||
$this->authorize('files', $object);
|
||||
|
||||
if (! $object) {
|
||||
return response()->json(Helper::formatStandardApiResponse('error', null, trans('general.file_upload_status.invalid_object')));
|
||||
@@ -141,7 +141,7 @@ class UploadedFilesController extends Controller
|
||||
{
|
||||
// Check the permissions to make sure the user can view the object
|
||||
$object = self::$map_object_type[$object_type]::withTrashed()->find($id);
|
||||
$this->authorize('view', $object);
|
||||
$this->authorize('files', $object);
|
||||
|
||||
if (! $object) {
|
||||
return response()->json(Helper::formatStandardApiResponse('error', null, trans('general.file_upload_status.invalid_object')));
|
||||
|
||||
@@ -85,7 +85,7 @@ class UploadedFilesController extends Controller
|
||||
{
|
||||
// Check the permissions to make sure the user can view the object
|
||||
$object = self::$map_object_type[$object_type]::withTrashed()->find($id);
|
||||
$this->authorize('view', $object);
|
||||
$this->authorize('files', $object);
|
||||
|
||||
if (! $object) {
|
||||
return redirect()->back()->withFragment('files')->with('error', trans('general.file_upload_status.invalid_object'));
|
||||
|
||||
@@ -117,9 +117,11 @@
|
||||
</x-copy-to-clipboard>
|
||||
</x-info-element>
|
||||
|
||||
@if ($infoPanelObj->model->category)
|
||||
<x-info-element icon_type="category" icon_color="{{ $infoPanelObj->model->category->tag_color }}" title="{{ trans('general.category') }}">
|
||||
<x-copy-to-clipboard class="pull-right" copy_what="category">{!! $infoPanelObj->model->category->present()->nameUrl !!}</x-copy-to-clipboard>
|
||||
</x-info-element>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if ($infoPanelObj->model_number)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
'item' => false,
|
||||
])
|
||||
|
||||
@can('view', $item)
|
||||
@can('files', $item)
|
||||
<x-tabs.nav-item
|
||||
:$class
|
||||
name="files"
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
count="{{ $asset->audits()->count() }}"
|
||||
tooltip="{{ trans('general.audits') }}"
|
||||
/>
|
||||
<x-tabs.files-tab count="{{ $asset->uploads()->count() }}"/>
|
||||
<x-tabs.files-tab :item="$asset" count="{{ $asset->uploads()->count() }}"/>
|
||||
<x-tabs.model-files-tab count="{{ $asset->model?->uploads()->count() }}"/>
|
||||
<x-tabs.history-tab count="{{ $asset->history()->count() }}" :model="$asset"/>
|
||||
<x-tabs.upload-tab :item="$asset"/>
|
||||
|
||||
@@ -1349,7 +1349,7 @@
|
||||
|
||||
|
||||
<!-- User Account: style can be found in dropdown.less -->
|
||||
@if (Auth::check())
|
||||
@if (auth()->check())
|
||||
<li class="dropdown user user-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
@if (auth()->user()->present()->gravatar())
|
||||
|
||||
Reference in New Issue
Block a user