Add a route to project audit_events.

This commit is contained in:
Marin Jankovski
2014-11-19 16:16:46 +01:00
parent b722baeec1
commit bcaf86da60
2 changed files with 19 additions and 0 deletions
@@ -0,0 +1,17 @@
class AuditEventsController < ApplicationController
# Authorize
before_filter :repository, only: :project_log
before_filter :authorize_admin_project!, only: :project_log
layout "project_settings"
def project_log
@events = AuditEvent.where(entity_type: "Project", entity_id: project.id)
end
private
def audit_events_params
params.permit(:project_id)
end
end
+2
View File
@@ -358,6 +358,8 @@ Gitlab::Application.routes.draw do
end
end
end
get "/audit_events" => "audit_events#project_log"
end
get ':id' => "namespaces#show", constraints: {id: /(?:[^.]|\.(?!atom$))+/, format: /atom/}