2018-10-22 07:00:50 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-07-18 08:16:56 +00:00
|
|
|
# Check a user's access to perform a git action. All public methods in this
|
|
|
|
# class return an instance of `GitlabAccessStatus`
|
2014-03-19 19:01:00 +00:00
|
|
|
module Gitlab
|
|
|
|
class GitAccess
|
2018-07-06 20:56:41 +00:00
|
|
|
include Gitlab::Utils::StrongMemoize
|
|
|
|
|
2016-11-02 21:50:44 +00:00
|
|
|
UnauthorizedError = Class.new(StandardError)
|
2017-05-19 19:58:45 +00:00
|
|
|
NotFoundError = Class.new(StandardError)
|
2018-01-25 12:26:52 +00:00
|
|
|
ProjectCreationError = Class.new(StandardError)
|
2018-10-22 14:49:20 +00:00
|
|
|
TimeoutError = Class.new(StandardError)
|
2017-08-18 19:06:41 +00:00
|
|
|
ProjectMovedError = Class.new(NotFoundError)
|
2016-11-02 21:50:44 +00:00
|
|
|
|
2018-12-20 16:25:48 +00:00
|
|
|
# Use the magic string '_any' to indicate we do not know what the
|
|
|
|
# changes are. This is also what gitlab-shell does.
|
|
|
|
ANY = '_any'
|
|
|
|
|
2016-11-02 21:50:44 +00:00
|
|
|
ERROR_MESSAGES = {
|
|
|
|
upload: 'You are not allowed to upload code for this project.',
|
|
|
|
download: 'You are not allowed to download code from this project.',
|
2018-02-06 17:25:36 +00:00
|
|
|
auth_upload: 'You are not allowed to upload code.',
|
|
|
|
auth_download: 'You are not allowed to download code.',
|
|
|
|
deploy_key_upload: 'This deploy key does not have write access to this project.',
|
2017-05-15 23:13:36 +00:00
|
|
|
no_repo: 'A repository for this project does not exist yet.',
|
|
|
|
project_not_found: 'The project you were looking for could not be found.',
|
2017-05-16 16:02:52 +00:00
|
|
|
command_not_allowed: "The command you're trying to execute is not allowed.",
|
2017-05-22 18:28:51 +00:00
|
|
|
upload_pack_disabled_over_http: 'Pulling over HTTP is not allowed.',
|
2017-09-06 02:24:31 +00:00
|
|
|
receive_pack_disabled_over_http: 'Pushing over HTTP is not allowed.',
|
2017-09-19 07:44:58 +00:00
|
|
|
read_only: 'The repository is temporarily read-only. Please try again later.',
|
2018-12-20 16:40:56 +00:00
|
|
|
cannot_push_to_read_only: "You can't push code to a read-only GitLab instance.",
|
|
|
|
push_code: 'You are not allowed to push code to this project.'
|
2017-02-21 23:32:18 +00:00
|
|
|
}.freeze
|
2016-11-02 21:50:44 +00:00
|
|
|
|
2018-10-25 09:36:40 +00:00
|
|
|
INTERNAL_TIMEOUT = 50.seconds.freeze
|
2018-10-25 08:49:59 +00:00
|
|
|
LOG_HEADER = <<~MESSAGE
|
|
|
|
Push operation timed out
|
|
|
|
|
|
|
|
Timing information for debugging purposes:
|
|
|
|
MESSAGE
|
|
|
|
|
2018-09-20 16:54:14 +00:00
|
|
|
DOWNLOAD_COMMANDS = %w{git-upload-pack git-upload-archive}.freeze
|
|
|
|
PUSH_COMMANDS = %w{git-receive-pack}.freeze
|
2016-11-02 21:50:44 +00:00
|
|
|
ALL_COMMANDS = DOWNLOAD_COMMANDS + PUSH_COMMANDS
|
2014-03-19 19:01:00 +00:00
|
|
|
|
2018-10-22 14:49:20 +00:00
|
|
|
attr_reader :actor, :project, :protocol, :authentication_abilities, :namespace_path, :project_path, :redirected_path, :auth_result_type, :changes, :logger
|
2014-03-19 19:01:00 +00:00
|
|
|
|
2018-03-27 15:35:27 +00:00
|
|
|
def initialize(actor, project, protocol, authentication_abilities:, namespace_path: nil, project_path: nil, redirected_path: nil, auth_result_type: nil)
|
2015-03-24 13:10:55 +00:00
|
|
|
@actor = actor
|
|
|
|
@project = project
|
2016-06-21 01:40:56 +00:00
|
|
|
@protocol = protocol
|
2016-09-16 07:59:10 +00:00
|
|
|
@authentication_abilities = authentication_abilities
|
2018-02-02 15:27:30 +00:00
|
|
|
@namespace_path = namespace_path
|
|
|
|
@project_path = project_path
|
|
|
|
@redirected_path = redirected_path
|
2018-03-27 15:35:27 +00:00
|
|
|
@auth_result_type = auth_result_type
|
2015-03-24 13:10:55 +00:00
|
|
|
end
|
|
|
|
|
2016-08-03 12:54:12 +00:00
|
|
|
def check(cmd, changes)
|
2018-10-25 08:49:59 +00:00
|
|
|
@logger = Checks::TimedLogger.new(timeout: INTERNAL_TIMEOUT, header: LOG_HEADER)
|
2018-07-06 20:56:41 +00:00
|
|
|
@changes = changes
|
|
|
|
|
2016-11-02 21:50:44 +00:00
|
|
|
check_protocol!
|
2017-08-28 20:33:35 +00:00
|
|
|
check_valid_actor!
|
2016-12-20 13:19:07 +00:00
|
|
|
check_active_user!
|
2018-02-06 17:25:36 +00:00
|
|
|
check_authentication_abilities!(cmd)
|
2017-05-16 16:02:52 +00:00
|
|
|
check_command_disabled!(cmd)
|
2016-11-02 21:50:44 +00:00
|
|
|
check_command_existence!(cmd)
|
2018-08-28 03:47:35 +00:00
|
|
|
|
2018-08-28 03:47:41 +00:00
|
|
|
custom_action = check_custom_action(cmd)
|
2018-08-28 03:47:35 +00:00
|
|
|
return custom_action if custom_action
|
|
|
|
|
2018-02-02 15:27:30 +00:00
|
|
|
check_db_accessibility!(cmd)
|
|
|
|
|
|
|
|
ensure_project_on_push!(cmd, changes)
|
|
|
|
|
|
|
|
check_project_accessibility!
|
2018-03-05 12:02:36 +00:00
|
|
|
add_project_moved_message!
|
2018-02-02 15:27:30 +00:00
|
|
|
check_repository_existence!
|
2015-05-10 21:07:35 +00:00
|
|
|
|
2014-03-19 19:01:00 +00:00
|
|
|
case cmd
|
|
|
|
when *DOWNLOAD_COMMANDS
|
2016-12-20 13:19:07 +00:00
|
|
|
check_download_access!
|
2014-03-19 19:01:00 +00:00
|
|
|
when *PUSH_COMMANDS
|
2018-07-06 20:56:41 +00:00
|
|
|
check_push_access!
|
2014-03-19 19:01:00 +00:00
|
|
|
end
|
2016-11-02 21:50:44 +00:00
|
|
|
|
2019-04-22 16:07:19 +00:00
|
|
|
success_result(cmd)
|
2014-03-19 19:01:00 +00:00
|
|
|
end
|
|
|
|
|
2016-12-06 13:10:27 +00:00
|
|
|
def guest_can_download_code?
|
2016-11-29 18:59:25 +00:00
|
|
|
Guest.can?(:download_code, project)
|
|
|
|
end
|
|
|
|
|
2016-09-15 08:34:53 +00:00
|
|
|
def user_can_download_code?
|
2016-09-16 07:59:10 +00:00
|
|
|
authentication_abilities.include?(:download_code) && user_access.can_do_action?(:download_code)
|
2016-08-08 10:01:25 +00:00
|
|
|
end
|
|
|
|
|
2016-09-15 08:34:53 +00:00
|
|
|
def build_can_download_code?
|
2016-09-16 07:59:10 +00:00
|
|
|
authentication_abilities.include?(:build_download_code) && user_access.can_do_action?(:build_download_code)
|
2015-03-24 13:10:55 +00:00
|
|
|
end
|
|
|
|
|
2018-03-27 15:35:27 +00:00
|
|
|
def request_from_ci_build?
|
|
|
|
return false unless protocol == 'http'
|
|
|
|
|
|
|
|
auth_result_type == :build || auth_result_type == :ci
|
|
|
|
end
|
|
|
|
|
2016-06-27 16:14:44 +00:00
|
|
|
def protocol_allowed?
|
|
|
|
Gitlab::ProtocolAccess.allowed?(protocol)
|
|
|
|
end
|
|
|
|
|
2014-03-19 19:01:00 +00:00
|
|
|
private
|
|
|
|
|
2018-08-28 03:47:41 +00:00
|
|
|
def check_custom_action(cmd)
|
|
|
|
nil
|
2018-08-28 03:47:35 +00:00
|
|
|
end
|
|
|
|
|
2019-03-28 01:33:45 +00:00
|
|
|
def check_for_console_messages(cmd)
|
|
|
|
[]
|
|
|
|
end
|
|
|
|
|
2017-08-21 10:30:03 +00:00
|
|
|
def check_valid_actor!
|
|
|
|
return unless actor.is_a?(Key)
|
|
|
|
|
|
|
|
unless actor.valid?
|
|
|
|
raise UnauthorizedError, "Your SSH key #{actor.errors[:key].first}."
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-11-02 21:50:44 +00:00
|
|
|
def check_protocol!
|
2018-03-27 15:35:27 +00:00
|
|
|
return if request_from_ci_build?
|
|
|
|
|
2016-11-02 21:50:44 +00:00
|
|
|
unless protocol_allowed?
|
|
|
|
raise UnauthorizedError, "Git access over #{protocol.upcase} is not allowed"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def check_active_user!
|
2018-05-10 14:13:05 +00:00
|
|
|
return unless user
|
|
|
|
|
|
|
|
unless user_access.allowed?
|
2018-05-08 13:07:55 +00:00
|
|
|
message = Gitlab::Auth::UserAccessDeniedReason.new(user).rejection_message
|
|
|
|
raise UnauthorizedError, message
|
2016-11-02 21:50:44 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-02-06 17:25:36 +00:00
|
|
|
def check_authentication_abilities!(cmd)
|
|
|
|
case cmd
|
|
|
|
when *DOWNLOAD_COMMANDS
|
|
|
|
unless authentication_abilities.include?(:download_code) || authentication_abilities.include?(:build_download_code)
|
|
|
|
raise UnauthorizedError, ERROR_MESSAGES[:auth_download]
|
|
|
|
end
|
|
|
|
when *PUSH_COMMANDS
|
|
|
|
unless authentication_abilities.include?(:push_code)
|
|
|
|
raise UnauthorizedError, ERROR_MESSAGES[:auth_upload]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-02-02 15:27:30 +00:00
|
|
|
def check_project_accessibility!
|
|
|
|
if project.blank? || !can_read_project?
|
2017-05-19 19:58:45 +00:00
|
|
|
raise NotFoundError, ERROR_MESSAGES[:project_not_found]
|
2016-11-02 21:50:44 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-03-05 12:02:36 +00:00
|
|
|
def add_project_moved_message!
|
2017-12-08 17:42:43 +00:00
|
|
|
return if redirected_path.nil?
|
2017-06-16 00:03:54 +00:00
|
|
|
|
2018-01-26 14:28:08 +00:00
|
|
|
project_moved = Checks::ProjectMoved.new(project, user, protocol, redirected_path)
|
2017-06-16 00:03:54 +00:00
|
|
|
|
2018-03-05 12:02:36 +00:00
|
|
|
project_moved.add_message
|
2017-06-16 00:03:54 +00:00
|
|
|
end
|
|
|
|
|
2017-05-16 16:02:52 +00:00
|
|
|
def check_command_disabled!(cmd)
|
2017-05-22 18:28:51 +00:00
|
|
|
if upload_pack?(cmd)
|
|
|
|
check_upload_pack_disabled!
|
|
|
|
elsif receive_pack?(cmd)
|
|
|
|
check_receive_pack_disabled!
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def check_upload_pack_disabled!
|
|
|
|
if http? && upload_pack_disabled_over_http?
|
|
|
|
raise UnauthorizedError, ERROR_MESSAGES[:upload_pack_disabled_over_http]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def check_receive_pack_disabled!
|
|
|
|
if http? && receive_pack_disabled_over_http?
|
|
|
|
raise UnauthorizedError, ERROR_MESSAGES[:receive_pack_disabled_over_http]
|
2017-05-16 16:02:52 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-11-02 21:50:44 +00:00
|
|
|
def check_command_existence!(cmd)
|
|
|
|
unless ALL_COMMANDS.include?(cmd)
|
2017-05-15 23:13:36 +00:00
|
|
|
raise UnauthorizedError, ERROR_MESSAGES[:command_not_allowed]
|
2016-11-02 21:50:44 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-02-02 15:27:30 +00:00
|
|
|
def check_db_accessibility!(cmd)
|
|
|
|
return unless receive_pack?(cmd)
|
|
|
|
|
|
|
|
if Gitlab::Database.read_only?
|
|
|
|
raise UnauthorizedError, push_to_read_only_message
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def ensure_project_on_push!(cmd, changes)
|
|
|
|
return if project || deploy_key?
|
2018-12-20 16:25:48 +00:00
|
|
|
return unless receive_pack?(cmd) && changes == ANY && authentication_abilities.include?(:push_code)
|
2018-02-02 15:27:30 +00:00
|
|
|
|
|
|
|
namespace = Namespace.find_by_full_path(namespace_path)
|
|
|
|
|
|
|
|
return unless user&.can?(:create_projects, namespace)
|
|
|
|
|
|
|
|
project_params = {
|
|
|
|
path: project_path,
|
|
|
|
namespace_id: namespace.id,
|
|
|
|
visibility_level: Gitlab::VisibilityLevel::PRIVATE
|
|
|
|
}
|
|
|
|
|
|
|
|
project = Projects::CreateService.new(user, project_params).execute
|
|
|
|
|
|
|
|
unless project.saved?
|
|
|
|
raise ProjectCreationError, "Could not create project: #{project.errors.full_messages.join(', ')}"
|
|
|
|
end
|
|
|
|
|
|
|
|
@project = project
|
|
|
|
user_access.project = @project
|
|
|
|
|
|
|
|
Checks::ProjectCreated.new(project, user, protocol).add_message
|
|
|
|
end
|
|
|
|
|
|
|
|
def check_repository_existence!
|
2018-02-22 00:20:30 +00:00
|
|
|
unless repository.exists?
|
2018-02-22 18:51:00 +00:00
|
|
|
raise NotFoundError, ERROR_MESSAGES[:no_repo]
|
2016-11-11 12:40:28 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-12-20 13:19:07 +00:00
|
|
|
def check_download_access!
|
2018-02-02 15:27:30 +00:00
|
|
|
passed = deploy_key? ||
|
2018-03-29 22:56:35 +00:00
|
|
|
deploy_token? ||
|
2018-02-02 15:27:30 +00:00
|
|
|
user_can_download_code? ||
|
2016-12-20 15:30:01 +00:00
|
|
|
build_can_download_code? ||
|
|
|
|
guest_can_download_code?
|
2016-12-20 13:19:07 +00:00
|
|
|
|
|
|
|
unless passed
|
|
|
|
raise UnauthorizedError, ERROR_MESSAGES[:download]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-07-06 20:56:41 +00:00
|
|
|
def check_push_access!
|
2017-09-06 02:24:31 +00:00
|
|
|
if project.repository_read_only?
|
2017-09-19 07:44:58 +00:00
|
|
|
raise UnauthorizedError, ERROR_MESSAGES[:read_only]
|
|
|
|
end
|
|
|
|
|
2018-03-28 16:54:15 +00:00
|
|
|
if deploy_key?
|
2018-02-06 17:25:36 +00:00
|
|
|
unless deploy_key.can_push_to?(project)
|
|
|
|
raise UnauthorizedError, ERROR_MESSAGES[:deploy_key_upload]
|
|
|
|
end
|
2016-12-20 13:19:07 +00:00
|
|
|
elsif user
|
2018-02-06 17:25:36 +00:00
|
|
|
# User access is verified in check_change_access!
|
2016-12-20 13:19:07 +00:00
|
|
|
else
|
|
|
|
raise UnauthorizedError, ERROR_MESSAGES[:upload]
|
|
|
|
end
|
|
|
|
|
2018-07-06 20:56:41 +00:00
|
|
|
check_change_access!
|
2016-12-20 13:19:07 +00:00
|
|
|
end
|
|
|
|
|
2018-07-06 20:56:41 +00:00
|
|
|
def check_change_access!
|
2018-12-20 16:39:20 +00:00
|
|
|
# Deploy keys with write access can push anything
|
|
|
|
return if deploy_key?
|
|
|
|
|
2018-12-20 16:40:56 +00:00
|
|
|
if changes == ANY
|
|
|
|
can_push = user_access.can_do_action?(:push_code) ||
|
|
|
|
project.any_branch_allows_collaboration?(user_access.user)
|
2018-03-29 23:10:43 +00:00
|
|
|
|
2018-12-20 16:40:56 +00:00
|
|
|
unless can_push
|
|
|
|
raise GitAccess::UnauthorizedError, ERROR_MESSAGES[:push_code]
|
|
|
|
end
|
|
|
|
else
|
|
|
|
# If there are worktrees with a HEAD pointing to a non-existent object,
|
|
|
|
# calls to `git rev-list --all` will fail in git 2.15+. This should also
|
|
|
|
# clear stale lock files.
|
|
|
|
project.repository.clean_stale_repository_files
|
|
|
|
|
|
|
|
# Iterate over all changes to find if user allowed all of them to be applied
|
|
|
|
changes_list.each.with_index do |change, index|
|
|
|
|
first_change = index == 0
|
|
|
|
|
|
|
|
# If user does not have access to make at least one change, cancel all
|
|
|
|
# push by allowing the exception to bubble up
|
|
|
|
check_single_change_access(change, skip_lfs_integrity_check: !first_change)
|
|
|
|
end
|
2016-11-11 12:40:28 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-02-13 19:33:13 +00:00
|
|
|
def check_single_change_access(change, skip_lfs_integrity_check: false)
|
2018-10-22 14:49:20 +00:00
|
|
|
change_access = Checks::ChangeAccess.new(
|
2016-11-17 19:48:23 +00:00
|
|
|
change,
|
|
|
|
user_access: user_access,
|
|
|
|
project: project,
|
2018-02-13 19:33:13 +00:00
|
|
|
skip_lfs_integrity_check: skip_lfs_integrity_check,
|
2018-10-22 14:49:20 +00:00
|
|
|
protocol: protocol,
|
|
|
|
logger: logger
|
|
|
|
)
|
|
|
|
|
|
|
|
change_access.exec
|
|
|
|
rescue Checks::TimedLogger::TimeoutError
|
2018-10-25 08:49:59 +00:00
|
|
|
raise TimeoutError, logger.full_message
|
2016-11-11 14:26:05 +00:00
|
|
|
end
|
|
|
|
|
2016-07-18 08:16:56 +00:00
|
|
|
def deploy_key
|
2016-11-17 19:48:23 +00:00
|
|
|
actor if deploy_key?
|
|
|
|
end
|
|
|
|
|
|
|
|
def deploy_key?
|
|
|
|
actor.is_a?(DeployKey)
|
2014-09-23 11:18:36 +00:00
|
|
|
end
|
2014-11-14 16:23:55 +00:00
|
|
|
|
2018-03-29 22:56:35 +00:00
|
|
|
def deploy_token
|
|
|
|
actor if deploy_token?
|
|
|
|
end
|
|
|
|
|
|
|
|
def deploy_token?
|
|
|
|
actor.is_a?(DeployToken)
|
|
|
|
end
|
|
|
|
|
2017-05-16 19:58:46 +00:00
|
|
|
def ci?
|
|
|
|
actor == :ci
|
|
|
|
end
|
|
|
|
|
2016-11-02 21:50:44 +00:00
|
|
|
def can_read_project?
|
2017-05-16 19:58:46 +00:00
|
|
|
if deploy_key?
|
2016-11-17 19:48:23 +00:00
|
|
|
deploy_key.has_access_to?(project)
|
2018-04-05 13:49:18 +00:00
|
|
|
elsif deploy_token?
|
|
|
|
deploy_token.has_access_to?(project)
|
2016-11-11 12:40:28 +00:00
|
|
|
elsif user
|
2016-11-17 19:48:23 +00:00
|
|
|
user.can?(:read_project, project)
|
2017-05-16 19:58:46 +00:00
|
|
|
elsif ci?
|
|
|
|
true # allow CI (build without a user) for backwards compatibility
|
2016-11-17 19:48:23 +00:00
|
|
|
end || Guest.can?(:read_project, project)
|
2016-11-02 21:50:44 +00:00
|
|
|
end
|
|
|
|
|
2017-05-16 16:02:52 +00:00
|
|
|
def http?
|
|
|
|
protocol == 'http'
|
|
|
|
end
|
|
|
|
|
|
|
|
def upload_pack?(command)
|
|
|
|
command == 'git-upload-pack'
|
|
|
|
end
|
|
|
|
|
|
|
|
def receive_pack?(command)
|
|
|
|
command == 'git-receive-pack'
|
|
|
|
end
|
|
|
|
|
2017-05-22 18:28:51 +00:00
|
|
|
def upload_pack_disabled_over_http?
|
|
|
|
!Gitlab.config.gitlab_shell.upload_pack
|
|
|
|
end
|
|
|
|
|
|
|
|
def receive_pack_disabled_over_http?
|
|
|
|
!Gitlab.config.gitlab_shell.receive_pack
|
|
|
|
end
|
|
|
|
|
2016-07-13 18:57:30 +00:00
|
|
|
protected
|
|
|
|
|
2019-04-22 16:07:19 +00:00
|
|
|
def success_result(cmd)
|
|
|
|
::Gitlab::GitAccessResult::Success.new(console_messages: check_for_console_messages(cmd))
|
|
|
|
end
|
|
|
|
|
2018-07-06 20:56:41 +00:00
|
|
|
def changes_list
|
2018-12-20 16:40:56 +00:00
|
|
|
@changes_list ||= Gitlab::ChangesList.new(changes == ANY ? [] : changes)
|
2018-07-06 20:56:41 +00:00
|
|
|
end
|
|
|
|
|
2016-07-18 08:16:56 +00:00
|
|
|
def user
|
|
|
|
return @user if defined?(@user)
|
|
|
|
|
|
|
|
@user =
|
|
|
|
case actor
|
|
|
|
when User
|
|
|
|
actor
|
2018-03-28 16:54:15 +00:00
|
|
|
when DeployKey
|
|
|
|
nil
|
2016-07-18 08:16:56 +00:00
|
|
|
when Key
|
2018-03-28 16:54:15 +00:00
|
|
|
actor.user
|
2017-05-16 19:58:46 +00:00
|
|
|
when :ci
|
|
|
|
nil
|
2016-07-18 08:16:56 +00:00
|
|
|
end
|
|
|
|
end
|
2017-05-23 19:26:46 +00:00
|
|
|
|
|
|
|
def user_access
|
|
|
|
@user_access ||= if ci?
|
|
|
|
CiAccess.new
|
2018-05-10 14:13:05 +00:00
|
|
|
elsif user && request_from_ci_build?
|
|
|
|
BuildAccess.new(user, project: project)
|
2017-05-23 19:26:46 +00:00
|
|
|
else
|
|
|
|
UserAccess.new(user, project: project)
|
|
|
|
end
|
|
|
|
end
|
2017-12-07 16:13:40 +00:00
|
|
|
|
|
|
|
def push_to_read_only_message
|
|
|
|
ERROR_MESSAGES[:cannot_push_to_read_only]
|
|
|
|
end
|
2018-02-22 00:20:30 +00:00
|
|
|
|
|
|
|
def repository
|
|
|
|
project.repository
|
|
|
|
end
|
2014-03-19 19:01:00 +00:00
|
|
|
end
|
|
|
|
end
|