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
Léo-Paul Géneau
gitlab-ce
Commits
b48852e7
Commit
b48852e7
authored
Dec 12, 2012
by
Valeriy Sizov
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2261 from jouve/fix_user_validation
Validates presence of User#name
parents
bca7bddd
63d9373a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
3 deletions
+2
-3
app/models/user.rb
app/models/user.rb
+1
-0
doc/api/users.md
doc/api/users.md
+1
-1
lib/api/users.rb
lib/api/users.rb
+0
-2
No files found.
app/models/user.rb
View file @
b48852e7
...
...
@@ -62,6 +62,7 @@ class User < ActiveRecord::Base
has_many
:assigned_issues
,
class_name:
"Issue"
,
foreign_key: :assignee_id
,
dependent: :destroy
has_many
:assigned_merge_requests
,
class_name:
"MergeRequest"
,
foreign_key: :assignee_id
,
dependent: :destroy
validates
:name
,
presence:
true
validates
:bio
,
length:
{
within:
0
..
255
}
validates
:extern_uid
,
allow_blank:
true
,
uniqueness:
{
scope: :provider
}
validates
:projects_limit
,
presence:
true
,
numericality:
{
greater_than_or_equal_to:
0
}
...
...
doc/api/users.md
View file @
b48852e7
...
...
@@ -75,7 +75,7 @@ POST /users
Parameters:
+
`email`
(required) - Email
+
`password`
(required) - Password
+
`name`
- Name
+
`name`
(required)
- Name
+
`skype`
- Skype ID
+
`linkedin`
- Linkedin
+
`twitter`
- Twitter account
...
...
lib/api/users.rb
View file @
b48852e7
...
...
@@ -101,8 +101,6 @@ module Gitlab
key
=
current_user
.
keys
.
find
params
[
:id
]
key
.
delete
end
end
end
end
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