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
79e94b68
Commit
79e94b68
authored
Feb 29, 2020
by
Rajendra Kadam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separate scope, detailed scope and dependecy classess into own class files
parent
a5b6b2a8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
19 deletions
+46
-19
ee/lib/ee/api/entities/dependency.rb
ee/lib/ee/api/entities/dependency.rb
+1
-5
ee/lib/ee/api/entities/dependency/vulnerability.rb
ee/lib/ee/api/entities/dependency/vulnerability.rb
+13
-0
ee/lib/ee/api/entities/feature_flag.rb
ee/lib/ee/api/entities/feature_flag.rb
+1
-14
ee/lib/ee/api/entities/feature_flag/detailed_scope.rb
ee/lib/ee/api/entities/feature_flag/detailed_scope.rb
+13
-0
ee/lib/ee/api/entities/feature_flag/scope.rb
ee/lib/ee/api/entities/feature_flag/scope.rb
+18
-0
No files found.
ee/lib/ee/api/entities/dependency.rb
View file @
79e94b68
...
...
@@ -4,15 +4,11 @@ module EE
module
API
module
Entities
class
Dependency
<
Grape
::
Entity
class
Vulnerability
<
Grape
::
Entity
expose
:name
,
:severity
end
expose
:name
,
:version
,
:package_manager
,
:dependency_file_path
expose
:dependency_file_path
do
|
dependency
|
dependency
[
:location
][
:path
]
end
expose
:vulnerabilities
,
using:
Vulnerability
,
if:
->
(
_
,
opts
)
{
can_read_vulnerabilities?
(
opts
[
:user
],
opts
[
:project
])
}
expose
:vulnerabilities
,
using:
Dependency
::
Vulnerability
,
if:
->
(
_
,
opts
)
{
can_read_vulnerabilities?
(
opts
[
:user
],
opts
[
:project
])
}
private
...
...
ee/lib/ee/api/entities/dependency/vulnerability.rb
0 → 100644
View file @
79e94b68
# frozen_string_literal: true
module
EE
module
API
module
Entities
class
Dependency
<
Grape
::
Entity
class
Vulnerability
<
Grape
::
Entity
expose
:name
,
:severity
end
end
end
end
end
ee/lib/ee/api/entities/feature_flag.rb
View file @
79e94b68
...
...
@@ -4,24 +4,11 @@ module EE
module
API
module
Entities
class
FeatureFlag
<
Grape
::
Entity
class
Scope
<
Grape
::
Entity
expose
:id
expose
:active
expose
:environment_scope
expose
:strategies
expose
:created_at
expose
:updated_at
end
class
DetailedScope
<
Scope
expose
:name
end
expose
:name
expose
:description
expose
:created_at
expose
:updated_at
expose
:scopes
,
using:
Scope
expose
:scopes
,
using:
FeatureFlag
::
Scope
end
end
end
...
...
ee/lib/ee/api/entities/feature_flag/detailed_scope.rb
0 → 100644
View file @
79e94b68
# frozen_string_literal: true
module
EE
module
API
module
Entities
class
FeatureFlag
<
Grape
::
Entity
class
DetailedScope
<
Scope
expose
:name
end
end
end
end
end
ee/lib/ee/api/entities/feature_flag/scope.rb
0 → 100644
View file @
79e94b68
# frozen_string_literal: true
module
EE
module
API
module
Entities
class
FeatureFlag
<
Grape
::
Entity
class
Scope
<
Grape
::
Entity
expose
:id
expose
:active
expose
:environment_scope
expose
:strategies
expose
:created_at
expose
:updated_at
end
end
end
end
end
\ No newline at end of file
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