Fixed #5168 - users without superadmin could not see custom fields UI even if granted

This commit is contained in:
snipe 2018-03-07 13:37:37 -08:00
parent 17e0154995
commit c4db8d37c2
2 changed files with 3 additions and 2 deletions

View file

@ -140,6 +140,7 @@ class AuthServiceProvider extends ServiceProvider
|| $user->can('view', \App\Models\Company::class) || $user->can('view', \App\Models\Company::class)
|| $user->can('view', \App\Models\Manufacturer::class) || $user->can('view', \App\Models\Manufacturer::class)
|| $user->can('view', \App\Models\Company::class) || $user->can('view', \App\Models\Company::class)
|| $user->can('view', \App\Models\CustomField::class)
|| $user->can('view', \App\Models\Depreciation::class); || $user->can('view', \App\Models\Depreciation::class);
}); });
} }

View file

@ -524,8 +524,8 @@
</a> </a>
<ul class="treeview-menu"> <ul class="treeview-menu">
@can('view', \App\Models\Customfield::class) @can('view', \App\Models\CustomField::class)
<li {!! (Request::is('custom_fields*') ? ' class="active"' : '') !!}> <li {!! (Request::is('fields*') ? ' class="active"' : '') !!}>
<a href="{{ route('fields.index') }}"> <a href="{{ route('fields.index') }}">
{{ trans('admin/custom_fields/general.custom_fields') }} {{ trans('admin/custom_fields/general.custom_fields') }}
</a> </a>