Skip to content

Add an API route for admins to assess crates #11528

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 11 commits into from
Jul 10, 2025

Conversation

carols10cents
Copy link
Member

Connects to #10387.

This API route, under /private/ rather than v1, will make it a lot easier to assess whether crates contain useful functionality or are squatting.

This is only the backend; some of the functionality described in the issue will be frontend-only, but I wanted to get the API in first.

The API route will only return data if the currently authenticated user is an admin. This is important because the crate owner's verified email address is part of the returned data so that the admin can contact the owner if necessary.

Another reason this route is limited to admins is that some of the queries may be slow.

Connects to #10387.

This API route, under `/private/` rather than `v1`, will make it a lot
easier to assess whether crates contain useful functionality or are
squatting.

This is only the backend; some of the functionality described in the
issue will be frontend-only, but I wanted to get the API in first.

The API route will only return data if the currently authenticated user
is an admin. This is important because the crate owner's verified email
address is part of the returned data so that the admin can contact the
owner if necessary.

Another reason this route is limited to admins is that some of the
queries may be slow.
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.

LGTM, just a few minor comments :)

@Turbo87 Turbo87 added C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear A-backend ⚙️ labels Jul 6, 2025
@carols10cents
Copy link
Member Author

Ok I added a bunch of little commits that should hopefully be easy-ish to review one-by-one, and i think addressed everything! great suggestions, thank you!!

@carols10cents carols10cents merged commit 4dcf06d into main Jul 10, 2025
10 checks passed
@carols10cents carols10cents deleted the superuser-super-user-view branch July 10, 2025 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend ⚙️ C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants