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
4d57d18d
Commit
4d57d18d
authored
Nov 08, 2019
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch 'security-12-4-filter-member-only-packages' into '12-4-stable-ee'"
This reverts commit
756ba726
.
parent
756ba726
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
42 deletions
+0
-42
ee/app/finders/packages/group_packages_finder.rb
ee/app/finders/packages/group_packages_finder.rb
+0
-2
ee/changelogs/unreleased/security-filter-member-only-packages-master.yml
...nreleased/security-filter-member-only-packages-master.yml
+0
-5
ee/spec/finders/packages/group_packages_finder_spec.rb
ee/spec/finders/packages/group_packages_finder_spec.rb
+0
-35
No files found.
ee/app/finders/packages/group_packages_finder.rb
View file @
4d57d18d
...
...
@@ -30,8 +30,6 @@ module Packages
::
Project
.
in_namespace
(
groups
)
.
public_or_visible_to_user
(
current_user
,
Gitlab
::
Access
::
REPORTER
)
.
with_project_feature
.
select
{
|
project
|
Ability
.
allowed?
(
current_user
,
:read_package
,
project
)
}
end
def
package_type
...
...
ee/changelogs/unreleased/security-filter-member-only-packages-master.yml
deleted
100644 → 0
View file @
756ba726
---
title
:
Filter out packages the user does'nt have permission to see at group level
merge_request
:
author
:
type
:
security
ee/spec/finders/packages/group_packages_finder_spec.rb
View file @
4d57d18d
...
...
@@ -72,40 +72,5 @@ describe Packages::GroupPackagesFinder do
it
{
is_expected
.
to
match_array
([
package1
])}
end
context
'when project is public'
do
set
(
:other_user
)
{
create
(
:user
)
}
let
(
:finder
)
{
described_class
.
new
(
other_user
,
group
)
}
before
do
project
.
update!
(
visibility_level:
ProjectFeature
::
ENABLED
)
end
context
'when packages are public'
do
before
do
project
.
project_feature
.
update!
(
builds_access_level:
ProjectFeature
::
PRIVATE
,
merge_requests_access_level:
ProjectFeature
::
PRIVATE
,
repository_access_level:
ProjectFeature
::
ENABLED
)
end
it
'returns group packages'
do
expect
(
finder
.
execute
).
to
match_array
([
package1
,
package2
])
end
end
context
'packages are members only'
do
before
do
project
.
project_feature
.
update!
(
builds_access_level:
ProjectFeature
::
PRIVATE
,
merge_requests_access_level:
ProjectFeature
::
PRIVATE
,
repository_access_level:
ProjectFeature
::
PRIVATE
)
end
it
'filters out the project if the user doesn\'t have permission'
do
expect
(
finder
.
execute
).
to
be_empty
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