1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-12-20 23:41:20 +00:00

Add notice about random passwords

This commit is contained in:
Mo 2022-05-08 22:04:08 +02:00
parent 11fb5f5428
commit 3d217383de
2 changed files with 25 additions and 6 deletions

View file

@ -119,15 +119,19 @@ class UserView(SecureAdminModelView):
) )
phone_number = StringField( phone_number = StringField(
"Phone Number", "Phone Number",
validators=[Optional()],
) )
mobile_phone_number = StringField( mobile_phone_number = StringField(
"Mobile Phone Number", "Mobile Phone Number",
validators=[Optional()],
) )
building = StringField( building = StringField(
"Building", "Building",
validators=[Optional()],
) )
room = StringField( room = StringField(
"Room", "Room",
validators=[Optional()],
) )
semester_experiments = QuerySelectMultipleField( semester_experiments = QuerySelectMultipleField(
@ -155,7 +159,7 @@ class UserView(SecureAdminModelView):
semester_experiments = None semester_experiments = None
generate_new_password = BooleanField( generate_new_password = BooleanField(
"Generate new random password", "Generate new random password. For security reasons, it is not possible to manually enter a password. Please use a password manager like Bitwarden or KeepassXC to save the randomly generated password.",
default=False, default=False,
) )

View file

@ -142,13 +142,28 @@ class AssistantExperimentMarkView(SecureAssistantModelView):
class AssistantUserView(SecureAssistantModelView): class AssistantUserView(SecureAssistantModelView):
class EditForm(Form): class EditForm(Form):
phone_number = StringField("Phone Number") phone_number = StringField(
mobile_phone_number = StringField("Mobile Phone Number") "Phone Number",
validators=[Optional()],
)
mobile_phone_number = StringField(
"Mobile Phone Number",
validators=[Optional()],
)
building = StringField("Building") building = StringField(
room = StringField("Room") "Building",
validators=[Optional()],
)
room = StringField(
"Room",
validators=[Optional()],
)
generate_new_password = BooleanField("Generate new random password", default=False) generate_new_password = BooleanField(
"Generate new random password. For security reasons, it is not possible to manually enter a password. Please use a password manager like Bitwarden or KeepassXC to save the randomly generated password.",
default=False,
)
can_edit = True can_edit = True
column_display_actions = True column_display_actions = True