Skip to content

Commit

Permalink
Refs #253. Updated user form
Browse files Browse the repository at this point in the history
  • Loading branch information
SBriere committed Oct 2, 2024
1 parent 2098597 commit 5dfa187
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion teraserver/python/modules/LoginModule/LoginModule.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def user_verify_password(self, username, password):
g.current_user = logged_user

# print('user_verify_password, found user: ', current_user)
# current_user.update_last_online()
current_user.update_last_online()

# Clear attempts counter
self.redisDelete(attempts_key)
Expand Down
14 changes: 9 additions & 5 deletions teraserver/python/opentera/forms/TeraUserForm.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ def get_user_form():
False, item_default=False))

section.add_item(TeraFormItem("user_2fa_otp_enabled", gettext("2FA OTP Enabled"), "boolean",
False, item_default=False))
section.add_item(TeraFormItem("user_2fa_email_enabled", gettext("2FA Email Enabled"), "boolean",
False, item_default=False))
False, item_default=False,
item_condition=TeraFormItemCondition("user_2fa_enabled", "=", True)))
section.add_item(TeraFormItem("user_2fa_email_enabled", gettext("2FA Email Enabled"), "hidden",
False, item_default=False,
# item_condition = TeraFormItemCondition("user_2fa_enabled", "=", True)
))

# section.add_item(TeraFormItem("user_2fa_otp_secret", gettext("OTP Secret"), "hidden"))
section.add_item(TeraFormItem("user_firstname", gettext("First Name"), "text", True))
Expand All @@ -37,9 +40,10 @@ def get_user_form():
section.add_item(
TeraFormItem("user_password", gettext("Password"), "password", item_options={"confirm": True}))
section.add_item(TeraFormItem("user_superadmin", gettext("User Is Super Administrator"), "boolean", True))
section.add_item(TeraFormItem("user_notes", gettext("Notes"), "longtext"))
section.add_item(TeraFormItem("user_profile", gettext("Profile"), "hidden"))
section.add_item(TeraFormItem("user_lastonline", gettext("Last Connection"), "datetime",
item_options={"readonly": True}))
section.add_item(TeraFormItem("user_notes", gettext("Notes"), "longtext"))
section.add_item(TeraFormItem("user_profile", gettext("Profile"), "hidden"))


return form.to_dict()
4 changes: 2 additions & 2 deletions teraserver/python/translations/fr/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2024-10-01 15:00-0400\n"
"PO-Revision-Date: 2024-10-01 15:04-0400\n"
"PO-Revision-Date: 2024-10-02 08:14-0400\n"
"Last-Translator: \n"
"Language-Team: fr <[email protected]>\n"
"Language: fr\n"
Expand Down Expand Up @@ -2385,7 +2385,7 @@ msgstr "ID Site"

#: opentera/forms/TeraSiteForm.py:18
msgid "Users Require 2FA"
msgstr "Exiger Authentification Multi-Facteurs (MFA)"
msgstr "Authentification Multi-Facteurs (MFA) requise"

#: opentera/forms/TeraSiteForm.py:20
msgid "Site Role"
Expand Down

0 comments on commit 5dfa187

Please sign in to comment.