summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Reigel <alexis.reigel.ext@siemens.com>2018-09-25 18:40:24 +0200
committerAlexis Reigel <alexis.reigel.ext@siemens.com>2018-09-27 11:33:55 +0200
commit585b1b3fca46cd7241701e5159a76501796ca091 (patch)
tree62c0061d686625ba88bd9baf1933df92f1f27dae
parent0a94bdfa1473d7e876e3a34be75a205a64b5056a (diff)
downloadgitlab-ce-585b1b3fca46cd7241701e5159a76501796ca091.tar.gz
add user's public_email attribute to api
-rw-r--r--doc/api/deployments.md2
-rw-r--r--doc/api/jobs.md5
-rw-r--r--doc/api/keys.md1
-rw-r--r--doc/api/runners.md1
-rw-r--r--doc/api/users.md4
-rw-r--r--lib/api/entities.rb2
6 files changed, 14 insertions, 1 deletions
diff --git a/doc/api/deployments.md b/doc/api/deployments.md
index 7cfa55159bd..1963b0a21de 100644
--- a/doc/api/deployments.md
+++ b/doc/api/deployments.md
@@ -55,6 +55,7 @@ Example of response
"created_at": "2015-12-21T13:14:24.077Z",
"bio": null,
"location": null,
+ "public_email": "",
"skype": "",
"linkedin": "",
"twitter": "",
@@ -113,6 +114,7 @@ Example of response
"created_at": "2015-12-21T13:14:24.077Z",
"bio": null,
"location": null,
+ "public_email": "",
"skype": "",
"linkedin": "",
"twitter": "",
diff --git a/doc/api/jobs.md b/doc/api/jobs.md
index eebe746c750..aa290ff4cf8 100644
--- a/doc/api/jobs.md
+++ b/doc/api/jobs.md
@@ -62,6 +62,7 @@ Example of response
"created_at": "2015-12-21T13:14:24.077Z",
"bio": null,
"location": null,
+ "public_email": "",
"skype": "",
"linkedin": "",
"twitter": "",
@@ -120,6 +121,7 @@ Example of response
"created_at": "2015-12-21T13:14:24.077Z",
"bio": null,
"location": null,
+ "public_email": "",
"skype": "",
"linkedin": "",
"twitter": "",
@@ -193,6 +195,7 @@ Example of response
"created_at": "2015-12-21T13:14:24.077Z",
"bio": null,
"location": null,
+ "public_email": "",
"skype": "",
"linkedin": "",
"twitter": "",
@@ -251,6 +254,7 @@ Example of response
"created_at": "2015-12-21T13:14:24.077Z",
"bio": null,
"location": null,
+ "public_email": "",
"skype": "",
"linkedin": "",
"twitter": "",
@@ -322,6 +326,7 @@ Example of response
"created_at": "2015-12-21T13:14:24.077Z",
"bio": null,
"location": null,
+ "public_email": "",
"skype": "",
"linkedin": "",
"twitter": "",
diff --git a/doc/api/keys.md b/doc/api/keys.md
index 0044fbfe66c..06b31a67d6a 100644
--- a/doc/api/keys.md
+++ b/doc/api/keys.md
@@ -28,6 +28,7 @@ Parameters:
"created_at": "2015-09-03T07:24:01.670Z",
"bio": null,
"location": null,
+ "public_email": "john@example.com",
"skype": "",
"linkedin": "",
"twitter": "",
diff --git a/doc/api/runners.md b/doc/api/runners.md
index 66476e7db64..94ad11f44d7 100644
--- a/doc/api/runners.md
+++ b/doc/api/runners.md
@@ -286,6 +286,7 @@ Example response:
"created_at": "2017-11-16T18:38:46.000Z",
"bio": null,
"location": null,
+ "public_email": "",
"skype": "",
"linkedin": "",
"twitter": "",
diff --git a/doc/api/users.md b/doc/api/users.md
index b0ae455a025..762ea53edee 100644
--- a/doc/api/users.md
+++ b/doc/api/users.md
@@ -199,6 +199,7 @@ Parameters:
"created_at": "2012-05-23T08:00:58Z",
"bio": null,
"location": null,
+ "public_email": "john@example.com",
"skype": "",
"linkedin": "",
"twitter": "",
@@ -230,6 +231,7 @@ Parameters:
"is_admin": false,
"bio": null,
"location": null,
+ "public_email": "john@example.com",
"skype": "",
"linkedin": "",
"twitter": "",
@@ -367,6 +369,7 @@ GET /user
"created_at": "2012-05-23T08:00:58Z",
"bio": null,
"location": null,
+ "public_email": "john@example.com",
"skype": "",
"linkedin": "",
"twitter": "",
@@ -415,6 +418,7 @@ GET /user
"is_admin": false,
"bio": null,
"location": null,
+ "public_email": "john@example.com",
"skype": "",
"linkedin": "",
"twitter": "",
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 0fec3dc3dc4..12c4340c1ba 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -53,7 +53,7 @@ module API
class User < UserBasic
expose :created_at, if: ->(user, opts) { Ability.allowed?(opts[:current_user], :read_user_profile, user) }
- expose :bio, :location, :skype, :linkedin, :twitter, :website_url, :organization
+ expose :bio, :location, :public_email, :skype, :linkedin, :twitter, :website_url, :organization
end
class UserActivity < Grape::Entity