Skip to content
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

Link to API token form from manage project page #6586

Merged
merged 2 commits into from
Sep 10, 2019

Conversation

nlhkabu
Copy link
Contributor

@nlhkabu nlhkabu commented Sep 5, 2019

Partially addresses #6551

With verified email

Screenshot from 2019-09-05 06-52-30

Without verified email

Screenshot from 2019-09-05 06-54-11

@nlhkabu
Copy link
Contributor Author

nlhkabu commented Sep 5, 2019

@woodruffw - is there a way that we can set up this URL so that when we land on the 'create token' page, the project is pre-selected in the form? E.g. for this project ("clandestined") landing on the page, it would look like this:

Screenshot from 2019-09-05 07-00-06

@nlhkabu nlhkabu requested a review from woodruffw September 5, 2019 06:00
@woodruffw
Copy link
Member

is there a way that we can set up this URL so that when we land on the 'create token' page, the project is pre-selected in the form? E.g. for this project ("clandestined") landing on the page, it would look like this:

Hmm, I'm not sure that there is with the current form setup -- we handle defaulting to the user's previously selected scope on form error by checking create_macaroon_form.token_scope.data, but I don't believe there's a direct way to set that from route_path.

A more invasive option would be to add some kind of route parameter like default_scope that we could prioritize over the state of create_macaroon_form, but that adds complexity. Maybe @dstufft or @ewdurbin have opinions/insight here?

@nlhkabu
Copy link
Contributor Author

nlhkabu commented Sep 10, 2019

@woodruffw do you think we should merge this PR and open a separate ticket for pre-selecting the form?

@woodruffw
Copy link
Member

do you think we should merge this PR and open a separate ticket for pre-selecting the form?

Yeah, I think that's a good solution for now.

@nlhkabu nlhkabu merged commit 205ae2e into master Sep 10, 2019
@nlhkabu nlhkabu deleted the 6551-api-token-link-from-project-page branch September 10, 2019 16:50
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.

2 participants