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
b1ee5538
Commit
b1ee5538
authored
Jul 09, 2020
by
Jan Provaznik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove skip_epic_count_visibility_check flag
parent
1e4701d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
15 deletions
+1
-15
ee/app/finders/epics_finder.rb
ee/app/finders/epics_finder.rb
+1
-5
ee/spec/finders/epics_finder_spec.rb
ee/spec/finders/epics_finder_spec.rb
+0
-10
No files found.
ee/app/finders/epics_finder.rb
View file @
b1ee5538
...
@@ -203,7 +203,7 @@ class EpicsFinder < IssuableFinder
...
@@ -203,7 +203,7 @@ class EpicsFinder < IssuableFinder
end
end
def
can_read_all_epics_in_related_groups?
(
groups
)
def
can_read_all_epics_in_related_groups?
(
groups
)
return
true
if
skip_visibility_check?
return
true
if
@skip_visibility_check
return
false
unless
current_user
return
false
unless
current_user
# If a user is a member of a group, he also inherits access to all subgroups,
# If a user is a member of a group, he also inherits access to all subgroups,
...
@@ -220,10 +220,6 @@ class EpicsFinder < IssuableFinder
...
@@ -220,10 +220,6 @@ class EpicsFinder < IssuableFinder
Ability
.
allowed?
(
current_user
,
:read_confidential_epic
,
parent
)
Ability
.
allowed?
(
current_user
,
:read_confidential_epic
,
parent
)
end
end
def
skip_visibility_check?
@skip_visibility_check
&&
Feature
.
enabled?
(
:skip_epic_count_visibility_check
,
group
,
default_enabled:
true
)
end
def
by_confidential
(
items
)
def
by_confidential
(
items
)
return
items
if
params
[
:confidential
].
nil?
return
items
if
params
[
:confidential
].
nil?
...
...
ee/spec/finders/epics_finder_spec.rb
View file @
b1ee5538
...
@@ -338,16 +338,6 @@ RSpec.describe EpicsFinder do
...
@@ -338,16 +338,6 @@ RSpec.describe EpicsFinder do
it
'returns all epics'
do
it
'returns all epics'
do
expect
(
subject
).
to
match_array
([
base_epic1
,
base_epic2
,
private_epic1
,
private_epic2
,
public_epic1
,
public_epic2
])
expect
(
subject
).
to
match_array
([
base_epic1
,
base_epic2
,
private_epic1
,
private_epic2
,
public_epic1
,
public_epic2
])
end
end
context
'when skip_epic_count_visibility_check is disabled'
do
before
do
stub_feature_flags
(
skip_epic_count_visibility_check:
false
)
end
it
'returns only public epics'
do
expect
(
subject
).
to
match_array
([
base_epic2
,
public_epic1
])
end
end
end
end
context
'when user is member of ancestor group'
do
context
'when user is member of ancestor group'
do
...
...
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