mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-17 00:26:07 +10:00
Add a route to project audit_events.
This commit is contained in:
@@ -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
|
||||
@@ -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/}
|
||||
|
||||
Reference in New Issue
Block a user