diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-11-29 16:59:25 -0200 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-11-30 16:02:24 -0200 |
commit | d6b9b21e6db3c32e0f272ab96486876fa8b54d1b (patch) | |
tree | 11392dce46f12f3c0ad236e1a1d143a3b64dceee /lib/gitlab/git_access_wiki.rb | |
parent | 467b44cbbfd70c627dca0a8f57966bc5ba0999c3 (diff) | |
download | gitlab-ce-d6b9b21e6db3c32e0f272ab96486876fa8b54d1b.tar.gz |
Allow access to the wiki with git when repository feature disabled
Diffstat (limited to 'lib/gitlab/git_access_wiki.rb')
-rw-r--r-- | lib/gitlab/git_access_wiki.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/gitlab/git_access_wiki.rb b/lib/gitlab/git_access_wiki.rb index f71d3575909..2c06c4ff1ef 100644 --- a/lib/gitlab/git_access_wiki.rb +++ b/lib/gitlab/git_access_wiki.rb @@ -1,5 +1,13 @@ module Gitlab class GitAccessWiki < GitAccess + def guest_can_downlod_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 change_access_check(change) if user_access.can_do_action?(:create_wiki) build_status_object(true) |