debian-mirror-gitlab/app/models/concerns/protected_branch_access.rb
2018-12-05 23:21:45 +05:30

19 lines
330 B
Ruby

# frozen_string_literal: true
module ProtectedBranchAccess
extend ActiveSupport::Concern
include ProtectedRefAccess
included do
belongs_to :protected_branch
delegate :project, to: :protected_branch
end
def check_access(user)
return false if access_level == Gitlab::Access::NO_ACCESS
super
end
end