Merge pull request #2261 from jouve/fix_user_validation
Validates presence of User#name
This commit is contained in:
commit
b48852e789
|
@ -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}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -101,8 +101,6 @@ module Gitlab
|
|||
key = current_user.keys.find params[:id]
|
||||
key.delete
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue