-
Notifications
You must be signed in to change notification settings - Fork 387
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
Clean up authorize assertions #11656
Conversation
nanaya
commented
Nov 15, 2024
- reject null user in some cases
- don't return anything
- reject null user in some cases - don't return anything
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.
Maybe now is a good time to make the methods private as well
app/Singletons/OsuAuthorize.php
Outdated
if ($user->isRestricted()) { | ||
throw new AuthorizationCheckException($prefix.'restricted'); | ||
} | ||
|
||
if ($user->isSilenced()) { | ||
throw new AuthorizationCheckException($prefix.'silenced'); | ||
} | ||
|
||
return 'ok'; | ||
} | ||
|
||
/** | ||
* @param User|null $user |
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.
also needs updating, or just removed since it's not adding any new info, same with the other one
a3561ab
to
2886b1c
Compare