Skip to content

Conversation

@woodruffw
Copy link
Member

@woodruffw woodruffw commented Jul 29, 2019

Closes #6262.

cc @di / @dstufft / @brainwane

@woodruffw woodruffw changed the title [WIP] warehouse: Allow maintainers to craft project tokens warehouse: Allow maintainers to craft project tokens Jul 29, 2019
@woodruffw woodruffw force-pushed the tob-project-tokens-for-maintainers branch from 0a71cce to f118b5f Compare July 29, 2019 18:49
@brainwane brainwane requested review from di and ewdurbin July 29, 2019 19:42
Copy link
Contributor

@brainwane brainwane left a comment

Choose a reason for hiding this comment

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

The token management screen links to manage/project/[project name]/releases/ (the link provided in the "scope" item for a project-scoped token) but, as a maintainer, that gives me an Access Denied: "You don't have permission to view this page" error. Perhaps it should link to project/[project name]/ if the user is a maintainer. Or if that's inelegant, it should link to that page for all users.

This avoids 403s for tokens created by maintainers.
@woodruffw
Copy link
Member Author

Perhaps it should link to project/[project name]/ if the user is a maintainer. Or if that's inelegant, it should link to that page for all users.

Done: I've linked to /project/{name} unconditionally, since retrieving the user's role for each project would be a little inelegant in this context (and I think consistency is best, since we're filling out a single row within a table).

Copy link
Contributor

@brainwane brainwane left a comment

Choose a reason for hiding this comment

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

Tested on localhost and I can successfully -- as a project maintainer -- create a token and upload a distribution with it.

@woodruffw
Copy link
Member Author

@di should be good for another pass!

@brainwane brainwane requested a review from di July 30, 2019 21:53
@ewdurbin ewdurbin merged commit ba6bc19 into pypi:master Jul 31, 2019
@woodruffw woodruffw deleted the tob-project-tokens-for-maintainers branch July 31, 2019 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Project-scoped API tokens] aren't available to maintainers

4 participants