gitlab-org--gitlab-foss/app/models/concerns/protected_branch_access.rb
James Edwards-Jones 96106287db Deduplicate protected ref human_access_levels
Previously these were duplicated so they could be different for push/merge,
but this was no longer necessary after
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11232
2017-11-24 13:47:03 +00:00

17 lines
310 B
Ruby

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