Applied StyleCI changes

This commit is contained in:
Dan Brown 2021-11-30 14:25:09 +00:00
parent 3b3eb0f44f
commit 9490457d04
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
2 changed files with 6 additions and 5 deletions

View File

@ -645,7 +645,7 @@ class PermissionService
public function filterRelatedEntity(string $entityClass, Builder $query, string $tableName, string $entityIdColumn): Builder
{
$fullEntityIdColumn = $tableName . '.' . $entityIdColumn;
$instance = new $entityClass;
$instance = new $entityClass();
$morphClass = $instance->getMorphClass();
$existsQuery = function ($permissionQuery) use ($fullEntityIdColumn, $morphClass) {

View File

@ -50,11 +50,12 @@ class ApiAuthenticate
}
/**
* Check if the active session user has API access
* Check if the active session user has API access.
*/
protected function sessionUserHasApiAccess(): bool
{
$hasApiPermission = user()->can('access-api');
return $hasApiPermission && hasAppAccess();
}