Class: Gitlab::GitAccessWiki

Inherits:
GitAccess show all
Defined in:
lib/gitlab/git_access_wiki.rb

Constant Summary

Constants inherited from GitAccess

Gitlab::GitAccess::DOWNLOAD_COMMANDS, Gitlab::GitAccess::PUSH_COMMANDS

Instance Attribute Summary

Attributes inherited from GitAccess

#actor, #project

Instance Method Summary collapse

Methods inherited from GitAccess

#can_push_to_branch?, #can_read_project?, #can_user_do_action?, #check, #deploy_key, #download_access_check, #forced_push?, #initialize, #push_access_check, #user, #user_download_access_check, #user_push_access_check

Constructor Details

This class inherits a constructor from Gitlab::GitAccess

Instance Method Details

#change_access_check(change) ⇒ Object


3
4
5
6
7
8
9
# File 'lib/gitlab/git_access_wiki.rb', line 3

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