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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
03cb51a3
Commit
03cb51a3
authored
Nov 05, 2020
by
Mario de la Ossa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GraphQL User: public_email instead of email
parent
54e5a8d4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
8 deletions
+14
-8
app/graphql/types/user_type.rb
app/graphql/types/user_type.rb
+2
-1
changelogs/unreleased/security-290-graphql-exposed-email.yml
changelogs/unreleased/security-290-graphql-exposed-email.yml
+5
-0
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+2
-2
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+3
-3
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+1
-1
spec/requests/api/graphql/user_query_spec.rb
spec/requests/api/graphql/user_query_spec.rb
+1
-1
No files found.
app/graphql/types/user_type.rb
View file @
03cb51a3
...
...
@@ -19,7 +19,8 @@ module Types
field
:state
,
Types
::
UserStateEnum
,
null:
false
,
description:
'State of the user'
field
:email
,
GraphQL
::
STRING_TYPE
,
null:
true
,
description:
'User email'
description:
'User email'
,
method: :public_email
,
deprecated:
{
reason:
'Use public_email'
,
milestone:
'13.7'
}
field
:public_email
,
GraphQL
::
STRING_TYPE
,
null:
true
,
description:
"User's public email"
field
:avatar_url
,
GraphQL
::
STRING_TYPE
,
null:
true
,
...
...
changelogs/unreleased/security-290-graphql-exposed-email.yml
0 → 100644
View file @
03cb51a3
---
title
:
'
GraphQL
User:
do
not
expose
email
if
set
to
private'
merge_request
:
author
:
type
:
security
doc/api/graphql/reference/gitlab_schema.graphql
View file @
03cb51a3
...
...
@@ -23295,9 +23295,9 @@ type User {
avatarUrl
:
String
"""
User
email
User
email
.
Deprecated
in
13.7
:
Use
public_email
"""
email
:
String
email
:
String
@
deprecated
(
reason
:
"
Use
public_email
.
Deprecated
in
13.7"
)
"""
Group
count
for
the
user
.
Available
only
when
feature
flag
`
user_group_counts
`
is
enabled
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
03cb51a3
...
...
@@ -67704,7 +67704,7 @@
},
{
"name": "email",
"description": "User email",
"description": "User email
. Deprecated in 13.7: Use public_email
",
"args": [
],
...
...
@@ -67713,8 +67713,8 @@
"name": "String",
"ofType": null
},
"isDeprecated":
fals
e,
"deprecationReason":
null
"isDeprecated":
tru
e,
"deprecationReason":
"Use public_email. Deprecated in 13.7"
},
{
"name": "groupCount",
doc/api/graphql/reference/index.md
View file @
03cb51a3
...
...
@@ -3487,7 +3487,7 @@ Autogenerated return type of UpdateSnippet.
|
`assignedMergeRequests`
| MergeRequestConnection | Merge Requests assigned to the user |
|
`authoredMergeRequests`
| MergeRequestConnection | Merge Requests authored by the user |
|
`avatarUrl`
| String | URL of the user's avatar |
|
`email`
| String | User email
|
|
`email`
**{warning-solid}**
| String |
**Deprecated:**
Use public_email. Deprecated in 13.7
|
|
`groupCount`
| Int | Group count for the user. Available only when feature flag
`user_group_counts`
is enabled |
|
`groupMemberships`
| GroupMemberConnection | Group memberships of the user |
|
`id`
| ID! | ID of the user |
...
...
spec/requests/api/graphql/user_query_spec.rb
View file @
03cb51a3
...
...
@@ -82,7 +82,7 @@ RSpec.describe 'getting user information' do
'username'
=>
presenter
.
username
,
'webUrl'
=>
presenter
.
web_url
,
'avatarUrl'
=>
presenter
.
avatar_url
,
'email'
=>
presenter
.
email
,
'email'
=>
presenter
.
public_
email
,
'publicEmail'
=>
presenter
.
public_email
))
...
...
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