Update BaseAPIController.php
This commit is contained in:
parent
6b377e6610
commit
942b06f999
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Reference in a new issue