1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-11-08 21:21:06 +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",
validators=[Optional()],
)
mobile_phone_number = StringField(
"Mobile Phone Number",
validators=[Optional()],
)
building = StringField(
"Building",
validators=[Optional()],
)
room = StringField(
"Room",
validators=[Optional()],
)
semester_experiments = QuerySelectMultipleField(
@ -155,7 +159,7 @@ class UserView(SecureAdminModelView):
semester_experiments = None
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,
)

View file

@ -142,13 +142,28 @@ class AssistantExperimentMarkView(SecureAssistantModelView):
class AssistantUserView(SecureAssistantModelView):
class EditForm(Form):
phone_number = StringField("Phone Number")
mobile_phone_number = StringField("Mobile Phone Number")
phone_number = StringField(
"Phone Number",
validators=[Optional()],
)
mobile_phone_number = StringField(
"Mobile Phone Number",
validators=[Optional()],
)
building = StringField("Building")
room = StringField("Room")
building = StringField(
"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
column_display_actions = True