mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Update BaseAPIController.php
This commit is contained in:
parent
6b377e6610
commit
942b06f999
@ -116,7 +116,7 @@ class BaseAPIController extends Controller
|
||||
$query->whereHas('client', $filter);
|
||||
}
|
||||
|
||||
if (! Utils::hasPermission('admin')) {
|
||||
if (! Utils::hasPermission('view_'.$this->entityType)) {
|
||||
if ($this->entityType == ENTITY_USER) {
|
||||
$query->where('id', '=', Auth::user()->id);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user