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
iv
gitlab-ce
Commits
00325a73
Commit
00325a73
authored
Oct 19, 2012
by
Nihad Abbasov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
name and password_confirmation not required to create a user via API
parent
0369c74e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
lib/api/users.rb
lib/api/users.rb
+3
-4
No files found.
lib/api/users.rb
View file @
00325a73
...
@@ -28,18 +28,17 @@ module Gitlab
...
@@ -28,18 +28,17 @@ module Gitlab
#
#
# Parameters:
# Parameters:
# email (required) - Email
# email (required) - Email
# name (required) - Name
# password (required) - Password
# password (required) - Password
#
password_confirmation (required) - Password confirmation
#
name - Name
# skype - Skype ID
# skype - Skype ID
# linkedin - Linkedin
# linkedin - Linkedin
# twitter - Twitter account
# twitter - Twitter account
# projects_limit -
Limit projects wich
user can create
# projects_limit -
Number of projects
user can create
# Example Request:
# Example Request:
# POST /users
# POST /users
post
do
post
do
authenticated_as_admin!
authenticated_as_admin!
attrs
=
attributes_for_keys
[
:email
,
:name
,
:password
,
:
password_confirmation
,
:
skype
,
:linkedin
,
:twitter
,
:projects_limit
]
attrs
=
attributes_for_keys
[
:email
,
:name
,
:password
,
:skype
,
:linkedin
,
:twitter
,
:projects_limit
]
user
=
User
.
new
attrs
,
as: :admin
user
=
User
.
new
attrs
,
as: :admin
if
user
.
save
if
user
.
save
present
user
,
with:
Entities
::
User
present
user
,
with:
Entities
::
User
...
...
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