Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
c1dddf8c
Commit
c1dddf8c
authored
Feb 20, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Uniqueness check should be case insensitive for username and path, otherwise mysql behaves weird.
parent
499a1185
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/models/namespace.rb
app/models/namespace.rb
+1
-1
app/models/user.rb
app/models/user.rb
+1
-1
No files found.
app/models/namespace.rb
View file @
c1dddf8c
...
...
@@ -27,7 +27,7 @@ class Namespace < ActiveRecord::Base
format:
{
with:
Gitlab
::
Regex
.
name_regex
,
message:
"only letters, digits, spaces & '_' '-' '.' allowed."
}
validates
:description
,
length:
{
within:
0
..
255
}
validates
:path
,
uniqueness:
true
,
presence:
true
,
length:
{
within:
1
..
255
},
validates
:path
,
uniqueness:
{
case_sensitive:
false
}
,
presence:
true
,
length:
{
within:
1
..
255
},
exclusion:
{
in:
Gitlab
::
Blacklist
.
path
},
format:
{
with:
Gitlab
::
Regex
.
path_regex
,
message:
"only letters, digits & '_' '-' '.' allowed. Letter should be first"
}
...
...
app/models/user.rb
View file @
c1dddf8c
...
...
@@ -109,7 +109,7 @@ class User < ActiveRecord::Base
validates
:bio
,
length:
{
maximum:
255
},
allow_blank:
true
validates
:extern_uid
,
allow_blank:
true
,
uniqueness:
{
scope: :provider
}
validates
:projects_limit
,
presence:
true
,
numericality:
{
greater_than_or_equal_to:
0
}
validates
:username
,
presence:
true
,
uniqueness:
true
,
validates
:username
,
presence:
true
,
uniqueness:
{
case_sensitive:
false
}
,
exclusion:
{
in:
Gitlab
::
Blacklist
.
path
},
format:
{
with:
Gitlab
::
Regex
.
username_regex
,
message:
"only letters, digits & '_' '-' '.' allowed. Letter should be first"
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment