Class: Gitlab::Checks::PushCheck

Inherits:
BaseChecker show all
Defined in:
lib/gitlab/checks/push_check.rb

Instance Attribute Summary

Attributes inherited from BaseChecker

#change_access

Instance Method Summary collapse

Methods inherited from BaseChecker

#initialize

Methods included from Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Constructor Details

This class inherits a constructor from Gitlab::Checks::BaseChecker

Instance Method Details

#validate!Object


6
7
8
9
10
11
12
# File 'lib/gitlab/checks/push_check.rb', line 6

def validate!
  logger.log_timed("Checking if you are allowed to push...") do
    unless can_push?
      raise GitAccess::ForbiddenError, GitAccess::ERROR_MESSAGES[:push_code]
    end
  end
end