debian-mirror-gitlab/lib/gitlab/git_access_wiki.rb

12 lines
290 B
Ruby
Raw Normal View History

2015-04-26 12:48:37 +05:30
module Gitlab
class GitAccessWiki < GitAccess
def change_access_check(change)
2015-09-11 14:41:01 +05:30
if user.can?(:create_wiki, project)
2015-04-26 12:48:37 +05:30
build_status_object(true)
else
2015-09-11 14:41:01 +05:30
build_status_object(false, "You are not allowed to write to this project's wiki.")
2015-04-26 12:48:37 +05:30
end
end
end
end