Class: Gitlab::GitAccessWiki
- Extended by:
- Utils::Override
- Defined in:
- lib/gitlab/git_access_wiki.rb
Constant Summary collapse
- ERROR_MESSAGES =
{ download: 'You are not allowed to download files from this wiki.', not_found: 'The wiki you were looking for could not be found.', no_repo: 'A repository for this wiki does not exist yet.', read_only: "You can't push code to a read-only GitLab instance.", write_to_wiki: "You are not allowed to write to this project's wiki." }.freeze
Constants inherited from GitAccess
Gitlab::GitAccess::ALL_COMMANDS, Gitlab::GitAccess::ANY, Gitlab::GitAccess::DOWNLOAD_COMMANDS, Gitlab::GitAccess::ForbiddenError, Gitlab::GitAccess::INTERNAL_TIMEOUT, Gitlab::GitAccess::LOG_HEADER, Gitlab::GitAccess::NotFoundError, Gitlab::GitAccess::PUSH_COMMANDS, Gitlab::GitAccess::TimeoutError
Instance Attribute Summary
Attributes inherited from GitAccess
#actor, #auth_result_type, #authentication_abilities, #changes, #cmd, #container, #protocol, #redirected_path, #repository_path
Instance Method Summary collapse
Methods included from Utils::Override
extended, extensions, included, method_added, override, prepended, queue_verification, verify!
Methods inherited from GitAccess
#check, #deploy_key_can_download_code?, error_message, #guest_can_download?, #initialize, #logger, #protocol_allowed?, #request_from_ci_build?, #user_can_download?
Constructor Details
This class inherits a constructor from Gitlab::GitAccess
Instance Method Details
#download_ability ⇒ Object
21 22 23 |
# File 'lib/gitlab/git_access_wiki.rb', line 21 def download_ability :download_wiki_code end |
#project ⇒ Object
16 17 18 |
# File 'lib/gitlab/git_access_wiki.rb', line 16 def project container.project if container.is_a?(ProjectWiki) end |
#push_ability ⇒ Object
26 27 28 |
# File 'lib/gitlab/git_access_wiki.rb', line 26 def push_ability :create_wiki end |