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
Boxiang Sun
gitlab-ce
Commits
801fe04b
Commit
801fe04b
authored
Sep 26, 2018
by
Alexis Reigel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow users api to set public_email
parent
f38aa2bf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
21 deletions
+26
-21
app/services/users/build_service.rb
app/services/users/build_service.rb
+2
-1
doc/api/users.md
doc/api/users.md
+21
-19
lib/api/users.rb
lib/api/users.rb
+1
-0
spec/services/users/build_service_spec.rb
spec/services/users/build_service_spec.rb
+2
-1
No files found.
app/services/users/build_service.rb
View file @
801fe04b
...
@@ -70,7 +70,8 @@ module Users
...
@@ -70,7 +70,8 @@ module Users
:website_url
,
:website_url
,
:private_profile
,
:private_profile
,
:organization
,
:organization
,
:location
:location
,
:public_email
]
]
end
end
...
...
doc/api/users.md
View file @
801fe04b
...
@@ -286,6 +286,7 @@ Parameters:
...
@@ -286,6 +286,7 @@ Parameters:
-
`provider`
(optional) - External provider name
-
`provider`
(optional) - External provider name
-
`bio`
(optional) - User's biography
-
`bio`
(optional) - User's biography
-
`location`
(optional) - User's location
-
`location`
(optional) - User's location
-
`public_email`
(optional) - The public email of the user
-
`admin`
(optional) - User is admin - true or false (default)
-
`admin`
(optional) - User is admin - true or false (default)
-
`can_create_group`
(optional) - User can create groups - true or false
-
`can_create_group`
(optional) - User can create groups - true or false
-
`skip_confirmation`
(optional) - Skip confirmation - true or false (default)
-
`skip_confirmation`
(optional) - Skip confirmation - true or false (default)
...
@@ -303,26 +304,27 @@ PUT /users/:id
...
@@ -303,26 +304,27 @@ PUT /users/:id
Parameters:
Parameters:
-
`email`
- Email
-
`email`
- Email
-
`username`
- Username
-
`username`
- Username
-
`name`
- Name
-
`name`
- Name
-
`password`
- Password
-
`password`
- Password
-
`skype`
- Skype ID
-
`skype`
- Skype ID
-
`linkedin`
- LinkedIn
-
`linkedin`
- LinkedIn
-
`twitter`
- Twitter account
-
`twitter`
- Twitter account
-
`website_url`
- Website URL
-
`website_url`
- Website URL
-
`organization`
- Organization name
-
`organization`
- Organization name
-
`projects_limit`
- Limit projects each user can create
-
`projects_limit`
- Limit projects each user can create
-
`extern_uid`
- External UID
-
`extern_uid`
- External UID
-
`provider`
- External provider name
-
`provider`
- External provider name
-
`bio`
- User's biography
-
`bio`
- User's biography
-
`location`
(optional) - User's location
-
`location`
(optional) - User's location
-
`admin`
(optional) - User is admin - true or false (default)
-
`public_email`
(optional) - The public email of the user
-
`can_create_group`
(optional) - User can create groups - true or false
-
`admin`
(optional) - User is admin - true or false (default)
-
`can_create_group`
(optional) - User can create groups - true or false
-
`skip_reconfirmation`
(optional) - Skip reconfirmation - true or false (default)
-
`skip_reconfirmation`
(optional) - Skip reconfirmation - true or false (default)
-
`external`
(optional) - Flags the user as external - true or false(default)
-
`external`
(optional)
- Flags the user as external - true or false(default)
-
`avatar`
(optional) - Image file for user's avatar
-
`avatar`
(optional)
- Image file for user's avatar
-
`private_profile`
(optional) - User's profile is private - true or false
-
`private_profile`
(optional)
- User's profile is private - true or false
On password update, user will be forced to change it upon next login.
On password update, user will be forced to change it upon next login.
Note, at the moment this method does only return a
`404`
error,
Note, at the moment this method does only return a
`404`
error,
...
...
lib/api/users.rb
View file @
801fe04b
...
@@ -42,6 +42,7 @@ module API
...
@@ -42,6 +42,7 @@ module API
optional
:provider
,
type:
String
,
desc:
'The external provider'
optional
:provider
,
type:
String
,
desc:
'The external provider'
optional
:bio
,
type:
String
,
desc:
'The biography of the user'
optional
:bio
,
type:
String
,
desc:
'The biography of the user'
optional
:location
,
type:
String
,
desc:
'The location of the user'
optional
:location
,
type:
String
,
desc:
'The location of the user'
optional
:public_email
,
type:
String
,
desc:
'The public email of the user'
optional
:admin
,
type:
Boolean
,
desc:
'Flag indicating the user is an administrator'
optional
:admin
,
type:
Boolean
,
desc:
'Flag indicating the user is an administrator'
optional
:can_create_group
,
type:
Boolean
,
desc:
'Flag indicating the user can create groups'
optional
:can_create_group
,
type:
Boolean
,
desc:
'Flag indicating the user can create groups'
optional
:external
,
type:
Boolean
,
desc:
'Flag indicating the user is an external user'
optional
:external
,
type:
Boolean
,
desc:
'Flag indicating the user is an external user'
...
...
spec/services/users/build_service_spec.rb
View file @
801fe04b
...
@@ -43,7 +43,8 @@ describe Users::BuildService do
...
@@ -43,7 +43,8 @@ describe Users::BuildService do
website_url:
1
,
website_url:
1
,
private_profile:
1
,
private_profile:
1
,
organization:
1
,
organization:
1
,
location:
1
location:
1
,
public_email:
1
}
}
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