Skip to content
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

Mark UserCompact.default_group as nullable in api docs #10319

Merged
merged 3 commits into from
Jul 4, 2023

Conversation

tybug
Copy link
Member

@tybug tybug commented Jun 29, 2023

If a user has a default usergroup of e.g. 34, default_group will be null for them in api responses. I'm guessing this is because identifier is null at a database level for certain groups, including the above.

I was going to suggest that identifier should be set in the db for all groups. But that could lead to the identifier being leaked for hidden groups if someone manages to find a user in that group and make the appropriate api call, so I'm not sure that's such a good idea anymore.

Copy link
Collaborator

@nanaya nanaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the typescript typing needs fixing as well (UserJson in interfaces, User in models)

@tybug
Copy link
Member Author

tybug commented Jun 30, 2023

I think I've updated things correctly, let me know. Not 100% on the difference between the typescript User model and the php User model.

@nanaya nanaya enabled auto-merge July 4, 2023 06:14
@nanaya nanaya merged commit 5946af3 into ppy:master Jul 4, 2023
3 checks passed
@tybug tybug deleted the user-default-group-nullable branch July 4, 2023 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants