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 terms of service acceptance date to user table #1046

Merged
merged 6 commits into from Feb 1, 2023

Conversation

andreaskoepf
Copy link
Collaborator

@andreaskoepf andreaskoepf commented Feb 1, 2023

  • add tos_acceptance_date (default NULL) to user table
  • allow to signal ToS acceptance by PUT /api/v1/users/{userid}?tos_acceptance=true
  • query acceptance date via GET /api/v1/users/{userid} or GET /api/v1/frontend_users/{auth_method}/{username}
  • ToS acceptance status is checked upon various calls, without ToS acceptance user cannot request tasks or submit responses
  • POST /api/v1/frontend_users/ to create new user with auth_method & user_name

other notes:

  • new setting: DEBUG_IGNORE_TOS_ACCEPTANCE
  • adapted text-frontend & auto_main.py

DEBUG_IGNORE_TOS_ACCEPTANCE temporarily defaults to True to allow merge and web-dev & testing. Default value will be set to False after the ToS acceptance UI has been added to the web frontend.

@andreaskoepf andreaskoepf requested a review from yk as a code owner February 1, 2023 00:03
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.add_column("user", sa.Column("tos_acceptance_date", sa.DateTime(timezone=True), nullable=True))
op.drop_column("user_stats", "streak_days")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

(melvinebenezer forgot to remove those when he moved the columns to the user table...)

Copy link
Collaborator

@yk yk left a comment

Choose a reason for hiding this comment

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

thank you

@andreaskoepf andreaskoepf enabled auto-merge (squash) February 1, 2023 22:52
@andreaskoepf andreaskoepf merged commit bbf0386 into main Feb 1, 2023
@andreaskoepf andreaskoepf deleted the user_tos_acceptance_date branch February 1, 2023 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants