Class: Gitlab::Checks::PushCheck

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

Instance Attribute Summary

Attributes inherited from BaseSingleChecker

#change_access

Instance Method Summary collapse

Methods inherited from BaseSingleChecker

#initialize

Constructor Details

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

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