blob: 67eaa5e088d87a86f7c679a535be198156d53f9d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
module Gitlab
class GitAccessWiki < GitAccess
def guest_can_download_code?
Guest.can?(:download_wiki_code, project)
end
def user_can_download_code?
authentication_abilities.include?(:download_code) && user_access.can_do_action?(:download_wiki_code)
end
def check_single_change_access(change)
if user_access.can_do_action?(:create_wiki)
build_status_object(true)
else
build_status_object(false, "You are not allowed to write to this project's wiki.")
end
end
end
end
|