Skip to content

app/routes/crate/settings: hide the settings page for non-owners #10792

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

Merged
merged 1 commit into from
Mar 10, 2025

Conversation

LawnGnome
Copy link
Contributor

@technetos pinged me via DM on this just in case it was a security issue. It wasn't, since the backend controllers all have appropriate permission checks, but there's no reason for us to even show this page to someone who doesn't own a crate.

I implemented some quick regression tests for the authentication side of the frontend controller based on the delete crate tests, but not a full set of tests for the page. It's Sunday night.

The backend controllers all have appropriate permission checks, so
there's no actual security issue here, but there's no reason for us to
even show this page to someone who doesn't own a crate.
@LawnGnome LawnGnome added C-bug 🐞 Category: unintended, undesired behavior A-frontend 🐹 labels Mar 10, 2025
@LawnGnome LawnGnome requested a review from a team March 10, 2025 03:23
@LawnGnome LawnGnome self-assigned this Mar 10, 2025
Copy link
Member

@Turbo87 Turbo87 left a comment

Choose a reason for hiding this comment

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

I've been aware of this for a while but figured that since the frontend doesn't actually know whether the user is a team owner, it's fine. But then again, it doesn't make much sense to use different logic for showing the tab and allowing the user to visit the page.

tl;dr LGTM :D

@Turbo87 Turbo87 merged commit 01ba12d into rust-lang:main Mar 10, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend 🐹 C-bug 🐞 Category: unintended, undesired behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants