gitlab-org--gitlab-foss/lib/gitlab/git_access_wiki.rb
Dmitriy Zaporozhets 342d553709
Rename abilities to correspond contoller/model action names
write_ was renamed to create_
modify_  was renamed to update_

So now in update action we have next code

def create
  can?(current_user, :create_issue, @issue)
end

def update
  can?(current_user, :update_issue, @issue)
end

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-26 15:55:56 +02:00

11 lines
290 B
Ruby

module Gitlab
class GitAccessWiki < GitAccess
def change_access_check(change)
if user.can?(:create_wiki, project)
build_status_object(true)
else
build_status_object(false, "You are not allowed to write to this project's wiki.")
end
end
end
end