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

add: Admin Tokens list #239

Merged
merged 1 commit into from
Feb 13, 2024
Merged

add: Admin Tokens list #239

merged 1 commit into from
Feb 13, 2024

Conversation

mrshu
Copy link
Contributor

@mrshu mrshu commented Feb 12, 2024

  • Add a view that lists admin user which are not yet invalid

  • Add a template filter that is capable of obtaining the User object by its id

  • Add a simple Jinja2 template that lists the emails, tokens and valid until dates

@mrshu mrshu requested a review from tvinar February 12, 2024 22:26
@mrshu mrshu self-assigned this Feb 12, 2024
<th>Token</th>
<th>Valid Until</th>
</tr>
{% for token in tokens if token.valid %}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tvinar doesn't check the validity against the current time

* Add a view that lists admin user which are not yet invalid

* Add a template filter that is capable of obtaining the User object by
  its id

* Add a simple Jinja2 template that lists the emails, tokens, links and
  valid until dates

Signed-off-by: mr.Shu <mr@shu.io>


@app.template_filter('get_user')
def get_user_filter(user_id):
Copy link
Member

Choose a reason for hiding this comment

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

This deserves its own file, e.g. template_filters.py. Maybe worth refactoring in the future.

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.

3 participants