summaryrefslogtreecommitdiff
path: root/lib/gitlab/regex.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-04-20 12:41:44 +0200
committerDouwe Maan <douwe@gitlab.com>2015-04-20 12:41:44 +0200
commitc75c6b840ba9ed82bb01eca52e968c2b0ec985e6 (patch)
tree5462da45d4e00335edc5d755f3729f11b317d0bb /lib/gitlab/regex.rb
parent41f01dd3f4c13502483f59b754af8429abc6af39 (diff)
downloadgitlab-ce-c75c6b840ba9ed82bb01eca52e968c2b0ec985e6.tar.gz
Revert disallowing usernames to end in period.revert-username-period
Diffstat (limited to 'lib/gitlab/regex.rb')
-rw-r--r--lib/gitlab/regex.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb
index 0571574aa4f..9aeed5e6939 100644
--- a/lib/gitlab/regex.rb
+++ b/lib/gitlab/regex.rb
@@ -2,7 +2,7 @@ module Gitlab
module Regex
extend self
- NAMESPACE_REGEX_STR = '(?:[a-zA-Z0-9_\.][a-zA-Z0-9_\-\.]*[a-zA-Z0-9_\-]|[a-zA-Z0-9_])'.freeze
+ NAMESPACE_REGEX_STR = '(?:[a-zA-Z0-9_\.][a-zA-Z0-9_\-\.]*)'.freeze
def namespace_regex
@namespace_regex ||= /\A#{NAMESPACE_REGEX_STR}\z/.freeze
@@ -10,7 +10,7 @@ module Gitlab
def namespace_regex_message
"can contain only letters, digits, '_', '-' and '.'. " \
- "Cannot start with '-' or end in '.'." \
+ "Cannot start with '-'." \
end