[user_registration] Fix calls to patterns

This commit is contained in:
tituspijean 2023-06-26 21:08:46 +00:00
parent 59eca6b2c9
commit e4f83f3413
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720

View file

@ -523,8 +523,7 @@ user:
default: "0" default: "0"
metavar: "{SIZE|0}" metavar: "{SIZE|0}"
extra: extra:
pattern: &pattern_mailbox_quota pattern: *pattern_mailbox_quota
- !!str ^(\d+[bkMGT])|0$
-g: -g:
full: --groups full: --groups
help: Group(s) to which the user will be added help: Group(s) to which the user will be added
@ -566,36 +565,28 @@ user:
username: username:
help: The unique username to create help: The unique username to create
extra: extra:
pattern: &pattern_username pattern: *pattern_username
- !!str ^[a-z0-9_]+$
- "pattern_username"
-F: -F:
full: --fullname full: --fullname
help: The full name of the user. For example 'Camille Dupont' help: The full name of the user. For example 'Camille Dupont'
extra: extra:
ask: ask_fullname ask: ask_fullname
required: False required: False
pattern: &pattern_fullname pattern: *pattern_fullname
- !!str ^([^\W_]{1,30}[ ,.'-]{0,3})+$
- "pattern_fullname"
-p: -p:
full: --password full: --password
help: User password help: User password
extra: extra:
password: ask_password password: ask_password
required: True required: True
pattern: &pattern_password pattern: *pattern_password
- !!str ^.{3,}$
- "pattern_password"
comment: good_practices_about_user_password comment: good_practices_about_user_password
#TODO: let the admin or the user decide that? #TODO: let the admin or the user decide that?
# -d: # -d:
# full: --domain # full: --domain
# help: Domain for the email address and xmpp account # help: Domain for the email address and xmpp account
# extra: # extra:
# pattern: &pattern_domain # pattern: *pattern_domain
# - !!str ^([^\W_A-Z]+([-]*[^\W_A-Z]+)*\.)+((xn--)?[^\W_]{2,})$
# - "pattern_domain"
#TODO: this should not be let up to the user #TODO: this should not be let up to the user
# -q: # -q:
# full: --mailbox-quota # full: --mailbox-quota
@ -603,9 +594,7 @@ user:
# default: "0" # default: "0"
# metavar: "{SIZE|0}" # metavar: "{SIZE|0}"
# extra: # extra:
# pattern: &pattern_mailbox_quota # pattern: *pattern_mailbox_quota
# - !!str ^(\d+[bkMGT])|0$
# - "pattern_mailbox_quota"
#TODO: let's keep it simple and let it default? #TODO: let's keep it simple and let it default?
# -s: # -s:
# full: --loginShell # full: --loginShell