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
ad13cee7
Commit
ad13cee7
authored
Jan 07, 2020
by
mo khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Inline filter params
parent
4c60f5b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
ee/app/controllers/projects/licenses_controller.rb
ee/app/controllers/projects/licenses_controller.rb
+3
-6
No files found.
ee/app/controllers/projects/licenses_controller.rb
View file @
ad13cee7
...
...
@@ -61,18 +61,15 @@ module Projects
params
.
require
(
:software_license_policy
).
permit
(
:software_license_id
,
:spdx_identifier
,
:classification
)
end
def
filter_params
params
.
permit
(
:detected
,
classification:
[])
end
def
render_error_for
(
result
)
render
json:
{
errors:
result
[
:message
].
as_json
},
status:
result
.
fetch
(
:http_status
,
:unprocessable_entity
)
end
def
matching_policies_from
(
license_compliance
)
filters
=
params
.
permit
(
:detected
,
classification:
[])
license_compliance
.
find_policies
(
detected_only:
filter
_param
s
[
:detected
].
present?
,
classification:
Array
(
filter_params
[
:classification
]
||
[])
detected_only:
filters
[
:detected
].
present?
,
classification:
filters
[
:classification
]
)
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