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
067ab0e3
Commit
067ab0e3
authored
Jun 17, 2019
by
Mark Florian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rely on feature flags being disabled by default
parent
35097265
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
5 deletions
+4
-5
ee/app/controllers/projects/dependencies_controller.rb
ee/app/controllers/projects/dependencies_controller.rb
+1
-1
ee/app/controllers/projects/security/dependencies_controller.rb
.../controllers/projects/security/dependencies_controller.rb
+1
-1
ee/app/models/ee/ci/build.rb
ee/app/models/ee/ci/build.rb
+1
-2
ee/app/views/projects/sidebar/_dependencies.html.haml
ee/app/views/projects/sidebar/_dependencies.html.haml
+1
-1
No files found.
ee/app/controllers/projects/dependencies_controller.rb
View file @
067ab0e3
...
...
@@ -5,7 +5,7 @@ module Projects
before_action
:check_feature_enabled!
def
check_feature_enabled!
render_404
unless
::
Feature
.
enabled?
(
:dependency_list
,
default_enabled:
false
)
&&
render_404
unless
::
Feature
.
enabled?
(
:dependency_list
)
&&
project
.
feature_available?
(
:dependency_list
)
end
end
...
...
ee/app/controllers/projects/security/dependencies_controller.rb
View file @
067ab0e3
...
...
@@ -28,7 +28,7 @@ module Projects
end
def
ensure_dependency_list_feature_available
render_404
unless
::
Feature
.
enabled?
(
:dependency_list
,
default_enabled:
false
)
&&
render_404
unless
::
Feature
.
enabled?
(
:dependency_list
)
&&
project
.
feature_available?
(
:dependency_list
)
end
...
...
ee/app/models/ee/ci/build.rb
View file @
067ab0e3
...
...
@@ -81,8 +81,7 @@ module EE
end
def
collect_dependency_list_reports!
(
dependency_list_report
)
flag_enabled
=
::
Feature
.
enabled?
(
:dependency_list
,
default_enabled:
false
)
if
flag_enabled
&&
project
.
feature_available?
(
:dependency_list
)
if
::
Feature
.
enabled?
(
:dependency_list
)
&&
project
.
feature_available?
(
:dependency_list
)
dependency_list
=
::
Gitlab
::
Ci
::
Parsers
::
Security
::
DependencyList
.
new
(
project
,
sha
)
each_report
(
::
Ci
::
JobArtifact
::
DEPENDENCY_LIST_REPORT_FILE_TYPES
)
do
|
file_type
,
blob
|
...
...
ee/app/views/projects/sidebar/_dependencies.html.haml
View file @
067ab0e3
-
if
::
Feature
.
enabled?
(
:dependency_list
,
default_enabled:
false
)
&&
@project
.
feature_available?
(
:dependency_list
)
-
if
::
Feature
.
enabled?
(
:dependency_list
)
&&
@project
.
feature_available?
(
:dependency_list
)
=
nav_link
(
path:
'projects/dependencies#show'
)
do
=
link_to
project_dependencies_path
(
@project
),
title:
_
(
'Dependency List'
),
class:
'shortcuts-project-dependencies'
do
%span
=
_
(
'Dependency List'
)
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