namespace BookStack\Http\Middleware;
use BookStack\Exceptions\ApiAuthException;
+use BookStack\Permissions\Permission;
use Closure;
use Illuminate\Http\Request;
*/
protected function sessionUserHasApiAccess(): bool
{
- $hasApiPermission = user()->can('access-api');
+ $hasApiPermission = user()->can(Permission::AccessApi);
return $hasApiPermission && user()->hasAppAccess();
}