2012-09-17 17:36:13 +00:00
|
|
|
# Controller for viewing a file's blame
|
2013-06-23 16:47:22 +00:00
|
|
|
class Projects::BlameController < Projects::ApplicationController
|
2012-09-20 17:55:14 +00:00
|
|
|
include ExtractsPath
|
2012-09-17 17:36:13 +00:00
|
|
|
|
2015-04-16 12:03:37 +00:00
|
|
|
before_action :require_non_empty_project
|
|
|
|
before_action :assign_ref_vars
|
|
|
|
before_action :authorize_download_code!
|
2012-09-17 17:36:13 +00:00
|
|
|
|
|
|
|
def show
|
2015-08-10 16:55:03 +00:00
|
|
|
@blob = @repository.blob_at(@commit.id, @path)
|
2016-01-28 13:49:21 +00:00
|
|
|
@blame_groups = Gitlab::Blame.new(@blob, @commit).groups
|
2012-09-17 17:36:13 +00:00
|
|
|
end
|
|
|
|
end
|