Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change compliance:*:export to list #3623

Merged
merged 2 commits into from
May 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/automate-gateway/gateway/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ func (s *Server) ReportExportHandler(w http.ResponseWriter, r *http.Request) {
// request body.
const (
resource = "compliance:reporting:reports"
action = "compliance:reports:export"
action = "compliance:reports:list"
)

ctx, err := s.authRequest(r, resource, action)
Expand Down Expand Up @@ -622,7 +622,7 @@ func writeContent(w http.ResponseWriter, stream reporting.ReportingService_Expor
func (s *Server) NodeExportHandler(w http.ResponseWriter, r *http.Request) {
const (
resource = "compliance:reporting:nodes:{id}"
action = "compliance:reportNodes:export"
action = "compliance:reportNodes:list"
)

ctx, err := s.authRequest(r, resource, action)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@
'reporting/stats/trend', # ReadTrend
'reporting/stats/profiles', # ReadProfiles
'reporting/stats/failures', # ReadFailures
'scanner/jobs/search' # List
'scanner/jobs/search', # List
'reporting/export' # ExportReport as json/csv
]
}.each do |method, urls|
urls.each do |url|
Expand Down Expand Up @@ -166,7 +167,6 @@
],
'POST': [
'scanner/jobs', # Create job
'reporting/export' # ExportReport as json/csv
]
}.each do |method, urls|
urls.each do |url|
Expand Down