Commit d85471ac authored by James Edwards-Jones's avatar James Edwards-Jones

Fixed UserAccess#can_create_tag? after create_access_levels rename

parent 07d7d8e6
......@@ -8,7 +8,7 @@ module ProtectedRef
delegate :matching, :matches?, :wildcard?, to: :ref_matcher
def self.protected_ref_accessible_to?(ref, user, action: :push)
def self.protected_ref_accessible_to?(ref, user, action:)
access_levels_for_ref(ref, action: action).any? do |access_level|
access_level.check_access(user)
end
......@@ -20,7 +20,7 @@ module ProtectedRef
end
end
def self.access_levels_for_ref(ref, action: :push)
def self.access_levels_for_ref(ref, action:)
self.matching(ref).map(&:"#{action}_access_levels").flatten
end
......
......@@ -32,7 +32,7 @@ module Gitlab
return false unless can_access_git?
if ProtectedTag.protected?(project, ref)
project.protected_tags.protected_ref_accessible_to?(ref, user)
project.protected_tags.protected_ref_accessible_to?(ref, user, action: :create)
else
user.can?(:push_code, project)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment