-
Notifications
You must be signed in to change notification settings - Fork 650
Replace rebuild docs button with dedicated confirmation page #11508
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
let user = this.session.currentUser; | ||
let owners = await model.crate.owner_user; | ||
let isOwner = owners.some(owner => owner.id === user.id); | ||
if (!isOwner) { |
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.
Couldn't we instead show the message on the page instead of redirecting the user?
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.
as mentioned in the DMs, this is how the rest of crates.io behaves and I don't see a reason why we should do it differently for this route. note that the URL will stay the same and the user will see a "This page is only accessible by crate owners" message.
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.
If URL is the same, then all good for me. 👍
Thanks for the feature! |
a4c977e
to
df0edad
Compare
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.
LGTM! I'm just not sure if we want the buttons to have a square style with slightly rounded corners, similar to those on the "Add a new Trusted Publisher" or "Report A Crate" pages, instead of the current fully-rounded buttons (not a blocker :D).
I guess either is fine for now, but we should probably settle on one style for the whole page in the future to ensure a somewhat consistent UI 😅 |
Resolves #11499