Sicherheitsupdate nach Audit (0.29.0)
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 7m50s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 7m34s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 5m45s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 5m30s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 7m7s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 7m9s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 6m8s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 6m5s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 48s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m5s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 7m50s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 7m34s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 5m45s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 5m30s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 7m7s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 7m9s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 6m8s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 6m5s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 48s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m5s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a37895a16a
commit
f1202bea08
226 changed files with 1952 additions and 450 deletions
|
|
@ -86,11 +86,22 @@ class BirthdayList
|
|||
*
|
||||
* @return list<array{date: string, person: array<string, mixed>}>
|
||||
*/
|
||||
public function inMonth(int $year, int $month): array
|
||||
public function inMonth(int $year, int $month, ?User $viewer = null): array
|
||||
{
|
||||
$scope = $this->scope();
|
||||
|
||||
return Birthday::query()
|
||||
->where('month', $month)
|
||||
->whereHas('user', fn ($q) => $q->where('is_active', true))
|
||||
->whereHas('user', function ($q) use ($viewer, $scope) {
|
||||
$q->where('is_active', true);
|
||||
|
||||
// Derselbe Kreis wie in der Geburtstagsliste (Abteilung bzw. Standort)
|
||||
if ($viewer && $scope === 'department') {
|
||||
$viewer->department ? $q->where('department', $viewer->department) : $q->whereKey($viewer->id);
|
||||
} elseif ($viewer && $scope === 'location') {
|
||||
$viewer->location ? $q->where('location', $viewer->location) : $q->whereKey($viewer->id);
|
||||
}
|
||||
})
|
||||
->with('user')
|
||||
->get()
|
||||
->filter(fn (Birthday $b) => checkdate($month, $b->day, $year) || ($month === 2 && $b->day === 29))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue