-
Notifications
You must be signed in to change notification settings - Fork 391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add per-beatmap team ranking #11989
Add per-beatmap team ranking #11989
Conversation
@@ -36,7 +36,7 @@ public function __construct() | |||
private static function assertSupporterOnlyOptions(?User $currentUser, string $type, array $mods): void | |||
{ | |||
$isSupporter = $currentUser !== null && $currentUser->isSupporter(); | |||
if ($type !== 'global' && !$isSupporter) { | |||
if (!in_array($type, ScoreSearchParams::FREE_TYPES, true) && !$isSupporter) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wonder if it makes more sense to make it SUPPORTER_TYPES
now if the condition is no longer simply !== 'global'
return 'supporter_only'; | ||
} | ||
|
||
return this.xhrState; | ||
} | ||
|
||
get requiresSupporter() { | ||
return !['global', 'team'].includes(this.currentType) || this.enabledMods.size > 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be a const Set<ScoreboardType>
(also maybe make it match against supporter required instead of not free)
I'm adding client-side support for this. |
🤷