BigW Consortium Gitlab

Commit ff2713a5 by James Edwards-Jones

Fix typos in ProtectedRef concern and whitespace detected by rubocop

parent 3c91841d
class Projects::ProtectedBranchesController < Projects::ProtectedRefsController class Projects::ProtectedBranchesController < Projects::ProtectedRefsController
protected protected
def protected_ref def protected_ref
......
class Projects::ProtectedTagsController < Projects::ProtectedRefsController class Projects::ProtectedTagsController < Projects::ProtectedRefsController
protected protected
def protected_ref def protected_ref
......
...@@ -19,7 +19,6 @@ module Projects ...@@ -19,7 +19,6 @@ module Projects
load_gon_index load_gon_index
end end
def access_levels_options def access_levels_options
#TODO: consider protected tags #TODO: consider protected tags
#TODO: Refactor ProtectedBranch::PushAccessLevel so it doesn't mention branches #TODO: Refactor ProtectedBranch::PushAccessLevel so it doesn't mention branches
......
...@@ -9,13 +9,13 @@ module ProtectedRef ...@@ -9,13 +9,13 @@ module ProtectedRef
delegate :matching, :matches?, :wildcard?, to: :ref_matcher delegate :matching, :matches?, :wildcard?, to: :ref_matcher
def self.matching_refs_accesible_to(ref, user, action: :push) def self.matching_refs_accesible_to(ref, user, action: :push)
access_levels_for_ref(ref, action).any? do |access_level| access_levels_for_ref(ref, action: action).any? do |access_level|
access_level.check_access(user) access_level.check_access(user)
end end
end end
def self.access_levels_for_ref(ref, action: :push) def self.access_levels_for_ref(ref, action: :push)
self.matching(ref).map(&:"@#{action}_access_levels").flatten self.matching(ref).map(&:"#{action}_access_levels").flatten
end end
def self.matching(ref_name, protected_refs: nil) def self.matching(ref_name, protected_refs: nil)
......
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