[issue #133] Fixed bug with no acl on editing blobs
This commit is contained in:
parent
391716fee5
commit
8c0cd29f0e
|
@ -17,9 +17,11 @@ class Git::BlobsController < Git::BaseController
|
|||
end
|
||||
|
||||
def edit
|
||||
authorize! :write, @project
|
||||
end
|
||||
|
||||
def update
|
||||
authorize! :write, @project
|
||||
# Here might be callbacks for notification purposes:
|
||||
# @git_repository.after_update_file do |repo, sha|
|
||||
# end
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#{link_to "Blame", blame_commit_path(@project, @commit_hash, @path)}
|
||||
#{link_to "History", commits_path(@project, @treeish, @path)}
|
||||
- else
|
||||
#{link_to "Edit", edit_blob_path(@project, @treeish, @path) if choose_render_way(@blob) == :text}
|
||||
#{link_to "Edit", edit_blob_path(@project, @treeish, @path) if choose_render_way(@blob) == :text and can? :write, @project}
|
||||
#{link_to "Raw", raw_path(@project, @treeish, @path)}
|
||||
#{link_to "Blame", blame_path(@project, @treeish, @path)}
|
||||
#{link_to "History", commits_path(@project, @treeish, @path)}
|
||||
|
|
Loading…
Reference in New Issue