mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Documentation for listResponse end point
This commit is contained in:
parent
3eee79d9b3
commit
da47f1bf32
@ -623,8 +623,8 @@ class BaseController extends Controller
|
||||
$query->with($includes);
|
||||
|
||||
// 10-01-2022 need to ensure we snake case properly here to ensure permissions work as expected
|
||||
// if (auth()->user() && ! auth()->user()->hasPermission('view_'.lcfirst(class_basename($this->entity_type)))) {
|
||||
if (auth()->user() && ! auth()->user()->hasPermission('view_'.lcfirst(class_basename(Str::snake($this->entity_type))))) {
|
||||
// 28-03-2022 this is definitely correct here, do not append _ to the view, it resolved correctly when snake cased
|
||||
if (auth()->user() && ! auth()->user()->hasPermission('view'.lcfirst(class_basename(Str::snake($this->entity_type))))) {
|
||||
$query->where('user_id', '=', auth()->user()->id);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user