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
c99ec9a5
Commit
c99ec9a5
authored
Sep 06, 2019
by
Alexandru Croitor
Committed by
Yorick Peterse
Sep 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display only participants that user has permission to see
parent
bcf63b2c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
1 deletion
+47
-1
app/controllers/concerns/milestone_actions.rb
app/controllers/concerns/milestone_actions.rb
+1
-1
changelogs/unreleased/security-12717-fix-confidential-issue-assignee-visible-to-guests.yml
...717-fix-confidential-issue-assignee-visible-to-guests.yml
+5
-0
spec/controllers/projects/milestones_controller_spec.rb
spec/controllers/projects/milestones_controller_spec.rb
+41
-0
No files found.
app/controllers/concerns/milestone_actions.rb
View file @
c99ec9a5
...
...
@@ -20,7 +20,7 @@ module MilestoneActions
format
.
html
{
redirect_to
milestone_redirect_path
}
format
.
json
do
render
json:
tabs_json
(
"shared/milestones/_participants_tab"
,
{
users:
@milestone
.
participants
# rubocop:disable Gitlab/ModuleWithInstanceVariables
users:
@milestone
.
issue_participants_visible_by_user
(
current_user
)
# rubocop:disable Gitlab/ModuleWithInstanceVariables
})
end
end
...
...
changelogs/unreleased/security-12717-fix-confidential-issue-assignee-visible-to-guests.yml
0 → 100644
View file @
c99ec9a5
---
title
:
Display only participants that user has permission to see on milestone page
merge_request
:
author
:
type
:
security
spec/controllers/projects/milestones_controller_spec.rb
View file @
c99ec9a5
...
...
@@ -244,4 +244,45 @@ describe Projects::MilestonesController do
end
end
end
context
'#participants'
do
render_views
context
"when guest user"
do
let
(
:issue_assignee
)
{
create
(
:user
)
}
let
(
:guest_user
)
{
create
(
:user
)
}
before
do
project
.
add_guest
(
guest_user
)
sign_in
(
guest_user
)
issue
.
update
(
assignee_ids:
issue_assignee
.
id
)
end
context
"when issue is not confidential"
do
it
'shows milestone participants'
do
params
=
{
namespace_id:
project
.
namespace
.
id
,
project_id:
project
.
id
,
id:
milestone
.
iid
,
format: :json
}
get
:participants
,
params:
params
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
response
.
content_type
).
to
eq
'application/json'
expect
(
json_response
[
'html'
]).
to
include
(
issue_assignee
.
name
)
end
end
context
"when issue is confidential"
do
before
do
issue
.
update
(
confidential:
true
)
end
it
'shows no milestone participants'
do
params
=
{
namespace_id:
project
.
namespace
.
id
,
project_id:
project
.
id
,
id:
milestone
.
iid
,
format: :json
}
get
:participants
,
params:
params
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
response
.
content_type
).
to
eq
'application/json'
expect
(
json_response
[
'html'
]).
not_to
include
(
issue_assignee
.
name
)
end
end
end
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