-
Notifications
You must be signed in to change notification settings - Fork 680
Implement trustpub_only user interface
#12390
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
Conversation
eth3lbert
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've looked through the test cases, and they look correct to me 👍
It looks like you might be missing the e2e tests. 😉
aaaaargh... again and again... how do I always forget this? 🙈 😅 |
This adds a `setTrustpubOnlyTask` to enable/disable the trusted publishing restriction via the PATCH `/api/v1/crates/{name}` endpoint.
The checkbox is now only visible when: - There are GitHub or GitLab trustpub configs, OR - The `trustpub_only` flag is currently enabled When the user disables the checkbox with no configs present, the checkbox stays visible for the duration of that page visit. On the next visit, it will be hidden.
…hing Shows a warning alert above the trusted publishing section when `trustpub_only` is enabled but no trusted publisher configs exist. The warning text: "Trusted publishing is required but no publishers are configured. Publishing to this crate is currently blocked."
…nner Port the QUnit tests to Playwright for the trustpub_only feature: - Warning banner visibility tests (5 tests) - Checkbox visibility and interaction tests (8 tests)
6188fe2 to
001f165
Compare
fixed now. thanks again for the reminder :) |
This PR implements the user interface seen above, to enable/disable the
trustpub_onlyflag for crates.The checkbox is only shown if a crate a) has trusted publishers configured or b) the flag is currently enabled. If the checkbox is unchecked when the crate has no more trusted publishers configured, it will stay visible until leaving the page.
The warning is shown whenever the crate has no trusted publishers configured and the flag is currently enabled.
Resolves #12361
Related
trustpub_onlyflag #12365trustpub_onlysupport #12382