-
Notifications
You must be signed in to change notification settings - Fork 820
Use token generator to authenticate just provisioned facility superadmin #13732
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,8 +2,8 @@ | |
| from rest_framework.response import Response | ||
| from rest_framework.views import APIView | ||
|
|
||
| from .utils import TokenGenerator | ||
| from kolibri.core.auth.models import FacilityUser | ||
| from kolibri.core.utils.token_generator import TokenGenerator | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My only other thought here is, could we actually delete the MergedUserLoginViewset, and just update the frontend in the user merging workflow to use your new enhanced SessionViewset instead? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We'll file a follow up issue for this to look at on develop as cleanup! |
||
|
|
||
|
|
||
| class OnMyOwnSetupViewset(APIView): | ||
|
|
||
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.
I wasn't even thinking that we could move so much of the viewset logic into the validate method, but this is a really nice separation of concerns, and provides such a neat interface between the serializer and the viewset, where the viewset only has to worry about the user and nothing else!