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

bug-1896962: improve Token admin #2932

Merged
merged 4 commits into from
May 16, 2024
Merged

bug-1896962: improve Token admin #2932

merged 4 commits into from
May 16, 2024

Conversation

willkg
Copy link
Collaborator

@willkg willkg commented May 15, 2024

This impproves the Token admin making it effectively like the one in Crash Stats. One nice thing is that tokens are searchable now.

To test:

  1. create a token:
    docker compose run --rm web bash python manage.py createtoken EMAIL TOKEN
    
  2. run everything with make run
  3. log in, go to the admin, go to the token manager
  4. view token list
  5. search tokens using email address substring

This impproves the Token admin making it effectively like the one in
Crash Stats. One nice thing is that tokens are searchable now.
@willkg willkg requested a review from a team as a code owner May 15, 2024 21:50
Copy link
Contributor

@smarnach smarnach left a comment

Choose a reason for hiding this comment

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

I tested this and it works fine. Only minor cosmetic issue is that the column titles are automatically derived from the method names, so the column with the email address is called "Get User Email", which is a bit weird. I added a suggestion with different names, which I tested and confirmed to be working.

tecken/tokens/admin.py Show resolved Hide resolved
tecken/tokens/admin.py Show resolved Hide resolved
tecken/tokens/admin.py Show resolved Hide resolved
willkg and others added 3 commits May 16, 2024 07:43
Co-authored-by: Sven Marnach <sven@mozilla.com>
Co-authored-by: Sven Marnach <sven@mozilla.com>
Co-authored-by: Sven Marnach <sven@mozilla.com>
@willkg willkg merged commit 33659bf into main May 16, 2024
1 check passed
@willkg willkg deleted the willkg-bug-1896962-tokens branch May 16, 2024 11:47
@willkg
Copy link
Collaborator Author

willkg commented May 16, 2024

Thank you!

@smarnach
Copy link
Contributor

I didn't realize every suggestion becomes a separate commit. I should probably have made that a single suggestion instead.

@willkg
Copy link
Collaborator Author

willkg commented May 16, 2024

You did fine! No worries!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants