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
b3e77e34
Commit
b3e77e34
authored
Jan 07, 2020
by
mo khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow filtering by classification
parent
01c530de
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
ee/app/controllers/projects/licenses_controller.rb
ee/app/controllers/projects/licenses_controller.rb
+4
-0
ee/spec/controllers/projects/licenses_controller_spec.rb
ee/spec/controllers/projects/licenses_controller_spec.rb
+1
-1
No files found.
ee/app/controllers/projects/licenses_controller.rb
View file @
b3e77e34
...
...
@@ -68,6 +68,10 @@ module Projects
def
matching_policies_from
(
license_compliance
)
if
params
[
:detected
]
license_compliance
.
detected_policies
elsif
params
[
:classifications
].
present?
license_compliance
.
policies
.
find_all
do
|
policy
|
params
[
:classifications
].
include?
(
policy
.
classification
)
end
else
license_compliance
.
policies
end
...
...
ee/spec/controllers/projects/licenses_controller_spec.rb
View file @
b3e77e34
...
...
@@ -178,7 +178,7 @@ describe Projects::LicensesController do
get
:index
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
,
classification:
[
'allowed'
]
classification
s
:
[
'allowed'
]
},
format: :json
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