Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hub
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MyIgel
hub
Commits
4aefab21
Commit
4aefab21
authored
1 year ago
by
HeJ
Browse files
Options
Downloads
Patches
Plain Diff
registration: disallow usernames starting with an underscore
parent
a05f5d70
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/core/forms.py
+2
-0
2 additions, 0 deletions
src/core/forms.py
src/core/locale/de/LC_MESSAGES/django.po
+3
-0
3 additions, 0 deletions
src/core/locale/de/LC_MESSAGES/django.po
src/core/locale/en/LC_MESSAGES/django.po
+3
-0
3 additions, 0 deletions
src/core/locale/en/LC_MESSAGES/django.po
with
8 additions
and
0 deletions
src/core/forms.py
+
2
−
0
View file @
4aefab21
...
...
@@ -130,6 +130,8 @@ class RegistrationForm(UserCreationForm):
def
clean
(
self
):
if
self
.
request
and
self
.
request
.
limited
:
raise
ValidationError
(
_
(
'
Registration__rate-limited
'
))
if
(
username
:
=
self
.
cleaned_data
.
get
(
'
username
'
))
and
username
.
startswith
(
'
_
'
):
raise
ValidationError
({
'
username
'
:
_
(
'
Registration__username__nounderscore
'
)})
return
super
().
clean
()
def
send_mail
(
...
...
This diff is collapsed.
Click to expand it.
src/core/locale/de/LC_MESSAGES/django.po
+
3
−
0
View file @
4aefab21
...
...
@@ -131,6 +131,9 @@ msgstr "Deine Kontakt Email für diese Veranstaltung (nicht öffentlich)"
msgid "Registration__rate-limited"
msgstr "Zu viele Request (Rate-Limited), bitte einen Moment warten!"
msgid "Registration__username__nounderscore"
msgstr "Der Benutzername darf nicht mit einem Unterstrich beginnen."
msgid "Tags"
msgstr ""
...
...
This diff is collapsed.
Click to expand it.
src/core/locale/en/LC_MESSAGES/django.po
+
3
−
0
View file @
4aefab21
...
...
@@ -131,6 +131,9 @@ msgstr "Your contact email for this event (not public)"
msgid "Registration__rate-limited"
msgstr "Too many requests (Rate-Limited), please wait a moment!"
msgid "Registration__username__nounderscore"
msgstr "The username must not begin with an underscore."
msgid "Tags"
msgstr ""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment