mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-16 13:31:25 +00:00
Applied StyleCI changes
This commit is contained in:
parent
3b3eb0f44f
commit
9490457d04
2 changed files with 6 additions and 5 deletions
app
|
@ -645,7 +645,7 @@ class PermissionService
|
||||||
public function filterRelatedEntity(string $entityClass, Builder $query, string $tableName, string $entityIdColumn): Builder
|
public function filterRelatedEntity(string $entityClass, Builder $query, string $tableName, string $entityIdColumn): Builder
|
||||||
{
|
{
|
||||||
$fullEntityIdColumn = $tableName . '.' . $entityIdColumn;
|
$fullEntityIdColumn = $tableName . '.' . $entityIdColumn;
|
||||||
$instance = new $entityClass;
|
$instance = new $entityClass();
|
||||||
$morphClass = $instance->getMorphClass();
|
$morphClass = $instance->getMorphClass();
|
||||||
|
|
||||||
$existsQuery = function ($permissionQuery) use ($fullEntityIdColumn, $morphClass) {
|
$existsQuery = function ($permissionQuery) use ($fullEntityIdColumn, $morphClass) {
|
||||||
|
|
|
@ -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
|
protected function sessionUserHasApiAccess(): bool
|
||||||
{
|
{
|
||||||
$hasApiPermission = user()->can('access-api');
|
$hasApiPermission = user()->can('access-api');
|
||||||
|
|
||||||
return $hasApiPermission && hasAppAccess();
|
return $hasApiPermission && hasAppAccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue