-
Notifications
You must be signed in to change notification settings - Fork 9
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
Invite panel #400
Invite panel #400
Conversation
I'll fix up the PR with any changes needed! |
6028d8f
to
6124ec7
Compare
Co-authored-by: Andreas Müller <[email protected]>
a5df424
to
4d15cb0
Compare
Co-authored-by: Andreas Müller <[email protected]>
Co-authored-by: Andreas Müller <[email protected]>
Co-authored-by: Andreas Müller <[email protected]>
Co-authored-by: Andreas Müller <[email protected]>
I accidentally rebased this on my old changes, so I had to go through and download / apply patch files from the now headless remote. It should be fixed now, if not a little out of order. Apologies! |
…w we check for admin emails
Added sending invitation Added data table filters
4bc31ef
to
74fe883
Compare
@router.post("/permission-check") | ||
def permission_check(_: Subscriber = Depends(get_admin_subscriber)): | ||
"""Checks if they have admin permissions""" | ||
return True |
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.
The check is done in get_admin_subscriber, and will error out. FastAPI has a weird relationship with using DI over middleware...
Additionally all admin checks will fail if |
No worries about the rebase, everything looks fine now. Sorry you had some additional effort because of that. The new subscriber panel is nice, also simplifies things for not having different admin pages for now. I fixed up some alignment and set the horizontal overflow scrollbar to auto (as for some systems, the scrollbar would be always visible with "scroll" 🙈 ). Also updated the language files (my IDE sorted the JSON keys, sorry about that 😇 ). So looking fine now! Idea for the data filters: We could integrate them into the table header beneath the column label. But I think it's also fine to have them above the table 🤷🏻 |
Thank you! Also thank you for re-sorting the language files as always! |
* Add wip invite panel * ➕ Add admin subscribers list * ➕ Add pagination and code revokal for invite codes * ➕ Add copy button and move table styles * ➕ Reordered vars and added admin allow list to env * ➕ Add admin dependency for admin invite routes * Daisy chain get_admin_subscriber off of get_subscriber, and adjust how we check for admin emails * Add an invite email and new route that creates a subscriber and emails them! * Allow a non-allow listed user to login if they already have an account. * Fix tests * Added data table Added sending invitation Added data table filters * Fix up fieldClick event, and hide the disable button for now. * Remove the now unneeded invite panel (sorry buddy, you were a good first draft!) * Pagination fixes, and send on enter * Hook up the secret to aws * Add some more tests * Add some basic responsiveness * 💚 Fix alignment, indentation and scrollbar * 🌐 Update German lang strings --------- Co-authored-by: Melissa Autumn <[email protected]>
Description of the Change
This change introduces admin only views. Those are currently protected by a dependency checking, if the current users email address is whitelisted in a .env var
APP_ADMIN_ALLOW_LIST
(comma separated list of email addresses).New route
/admin/invites
:Invite codes list is paginated, filterable, and codes can be bulk generated, copied and revoked.
New route
/admin/subscribers
:For now, subscribers can only be listed. Showing invite status and disabling them is still todo.
Benefits
Administration tools for quick management of invites and subscribers.
Applicable Issues
Closes #362