Skip to content

Commit

Permalink
Only show actor for default group events if user is privileged
Browse files Browse the repository at this point in the history
  • Loading branch information
cl8n committed Aug 2, 2023
1 parent 6bff3e1 commit ebcc04d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/Libraries/OsuAuthorize.php
Original file line number Diff line number Diff line change
Expand Up @@ -1927,6 +1927,10 @@ public function checkScorePin(?User $user, ScoreBest|Solo\Score $score): string

public function checkUserGroupEventShowActor(?User $user, UserGroupEvent $event): string
{
if ($event->group->identifier === 'default') {
return $user?->isPrivileged() ? 'ok' : 'unauthorized';
}

if ($user?->isGroup($event->group)) {
return 'ok';
}
Expand Down

0 comments on commit ebcc04d

Please sign in to comment.