Skip to content

Commit

Permalink
fix: save enabled auth factors as csv
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Sep 27, 2023
1 parent e1b8280 commit 1d04dce
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
26 changes: 26 additions & 0 deletions cfl_common/common/migrations/0045_auto_20230927_1004.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Generated by Django 3.2.20 on 2023-09-27 09:04

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('common', '0044_update_activity_models'),
]

operations = [
migrations.AddField(
model_name='userprofile',
name='enabled_auth_factor_csv',
field=models.TextField(default=''),
),
migrations.AlterField(
model_name='userprofile',
name='user',
field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='profile', to=settings.AUTH_USER_MODEL),
),
]
9 changes: 7 additions & 2 deletions cfl_common/common/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@


class UserProfile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
developer = models.BooleanField(default=False)
user = models.OneToOneField(
User,
related_name="profile",
on_delete=models.CASCADE,
)

enabled_auth_factor_csv = models.TextField(default="")
developer = models.BooleanField(default=False)
is_verified = models.BooleanField(default=False)

# Holds the user's earned kurono badges. This information has to be on the UserProfile as the Avatar objects are
Expand Down

0 comments on commit 1d04dce

Please sign in to comment.