Skip to content

feat(labrinth): user preferences - #7177

Open
Sychic wants to merge 26 commits into
mainfrom
sychic/user-preferences
Open

feat(labrinth): user preferences#7177
Sychic wants to merge 26 commits into
mainfrom
sychic/user-preferences

Conversation

@Sychic

@Sychic Sychic commented Aug 16, 2026

Copy link
Copy Markdown
Member

still need to validate language, couldn't think of a good way to do that yet

@github-actions

Copy link
Copy Markdown
Contributor

Pull request changelog

App

Added

Changed

Deprecated

Removed

Fixed

Security

Website

Added

Changed

Deprecated

Removed

Fixed

Security

Hosting

Added

Changed

Deprecated

Removed

Fixed

Security

Comment thread apps/labrinth/src/routes/v3/users.rs Outdated
Comment on lines +400 to +404
if requester.id != target.id.into() && !requester.role.is_mod() {
return Err(ApiError::Auth(eyre!(
"you do not have permission to access this user's preferences"
)));
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

would make this a little clearer since it involves an auth precondition

Suggested change
if requester.id != target.id.into() && !requester.role.is_mod() {
return Err(ApiError::Auth(eyre!(
"you do not have permission to access this user's preferences"
)));
}
let can_access = requester.id == target.id.into() || requester.role.is_mod();
if !can_access {
return Err(ApiError::Auth(eyre!(
"you do not have permission to access this user's preferences"
)));
}

Comment thread apps/labrinth/src/routes/v3/users.rs Outdated
Comment on lines +450 to +454
if requester.id != target.id.into() && !requester.role.is_mod() {
return Err(ApiError::Auth(eyre!(
"you do not have permission to access this user's preferences"
)));
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same here

@mergify

mergify Bot commented Aug 17, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants