Release 2.0.8 (#3914)

* support parsing negative durations in JS
* bump luxon dependency
* make sure that 2FA is not required for session based API calls
* show name of items to delete
* fix permission issue for recent activity items
This commit is contained in:
Kevin Papst
2023-03-13 01:48:53 +01:00
committed by GitHub
parent 1310285133
commit 8449eafcb6
20 changed files with 92 additions and 50 deletions

View File

@@ -39,7 +39,7 @@ final class FavoriteRecordService
$recentIds = $this->repository->getRecentActivityIds($user, null, $limit);
}
/** @var array<int> $ids */
$ids = \array_slice(array_unique(array_merge($favIds, $recentIds)), 0, $limit);
$ids = array_unique(array_merge($favIds, $recentIds));
/** @var array<int, bool|FavoriteTimesheet> $favorites */
$favorites = [];
@@ -49,7 +49,7 @@ final class FavoriteRecordService
$all = [];
if (\count($ids) > 0) {
$timesheets = $this->repository->findTimesheetsById($ids, false, false);
$timesheets = $this->repository->findTimesheetsById($user, $ids, false, false);
foreach ($timesheets as $timesheet) {
$id = $timesheet->getId();
if ($id === null) {
@@ -69,7 +69,7 @@ final class FavoriteRecordService
}
}
return array_values($all);
return \array_slice(array_values($all), 0, $limit);
}
private function getBookmark(User $user): Bookmark