Skip to content

Commit

Permalink
chore: add pinChangeRequired field to the user model
Browse files Browse the repository at this point in the history
This will be used to determine the onboarding path for myCareHub app users.
If a pin change is not required, they will be directed to the home page.
If required, they will go through the whole process of setting up a new
account e.g set security questions, accept terms etc
  • Loading branch information
Salaton committed Nov 21, 2021
1 parent 66e988d commit 975f367
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions mycarehub/users/migrations/0015_user_pin_change_required.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.9 on 2021-11-21 12:34

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('users', '0014_alter_user_next_allowed_login'),
]

operations = [
migrations.AddField(
model_name='user',
name='pin_change_required',
field=models.BooleanField(blank=True, default=True, null=True),
),
]
1 change: 1 addition & 0 deletions mycarehub/users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ class User(AbstractUser):
is_suspended = BooleanField(
default=False,
)
pin_change_required = BooleanField(default=True, blank=True, null=True)

@property
def permissions(self):
Expand Down

0 comments on commit 975f367

Please sign in to comment.