Skip to content

fix private match access check boolean logic#254

Closed
raya-ac wants to merge 1 commit into
osuAkatsuki:masterfrom
raya-ac:fix/multiplayer-auth-logic
Closed

fix private match access check boolean logic#254
raya-ac wants to merge 1 commit into
osuAkatsuki:masterfrom
raya-ac:fix/multiplayer-auth-logic

Conversation

@raya-ac

@raya-ac raya-ac commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Fixes #249

Changed || to && so access is denied only when the user is neither a participant nor tournament staff.

if privateMatch &&
(!inList(participantsIds, ctx.User.ID) ||
(!inList(participantsIds, ctx.User.ID) &&
ctx.User.Privileges&common.UserPrivilegeTournamentStaff == 0) {

@cmyui cmyui Apr 3, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i think this is intentional?

if it's a private match, and if theyre either (not in match or not staff), then reject

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

if they were in the match or if they are an admin, they can see it

negate it and it becomes if they were not in the match and they are not an admin, they cant see it (or -> and)

@raya-ac raya-ac closed this by deleting the head repository Apr 16, 2026
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.

Private match access check uses wrong boolean operator

3 participants