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

new auth flow implementation from new design #1081

Closed
yokwejuste opened this issue Jan 6, 2024 · 2 comments · Fixed by #1082
Closed

new auth flow implementation from new design #1081

yokwejuste opened this issue Jan 6, 2024 · 2 comments · Fixed by #1082

Comments

@yokwejuste
Copy link
Collaborator

yokwejuste commented Jan 6, 2024

From the new auth flow provided on the design we should implement some changes on the backend to match all this data.
image
image
image

@yokwejuste yokwejuste converted this from a draft issue Jan 6, 2024
@NdibeRaymond
Copy link
Collaborator

NdibeRaymond commented Jan 6, 2024

For this I think on the backend we need to change two files (maybe three or more if you add comment changes):

  1. zubhub_backend/zubhub/creators/serializers.py
    CustomRegisterSerializer:

    • add tag field
    • validate the tag received
  2. zubhub_backend/zubhub/creators/adapter.py
    CustomAccountAdapter

    • get the tag string, get the corresponding creatortag here and set it
    • if creatortag is staff you need to set creator.is_staff = True too
    • do these before creator.save()

do not touch the tasks.py or signals.py since The CreatorTag operation in signals just helps to make sure that when you create a user without specifying a CreatorTag (or somehow remove all of a creators tag) it defaults to "creator"

Also you might need to update RegisterCreatorAPIView top comment by adding the tag field there.

@coderatomy
Copy link
Collaborator

Related to #1021

@yokwejuste yokwejuste moved this from Todo to Ready for Merge in Outreachy 27 Jan 30, 2024
@github-project-automation github-project-automation bot moved this from Ready for Merge to Done in Outreachy 27 Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants