Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Edwards-Jones <jedwardsjones@gitlab.com>2017-04-04 00:04:37 +0300
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2017-04-04 00:04:37 +0300
commitff2713a57046bd08764ad391d7f34bd27f787610 (patch)
tree89545571971411a3aa9a7deea61f08c2d9be0967
parent3c91841d032f02b0b0d4c532998bbc923247e804 (diff)
Fix typos in ProtectedRef concern and whitespace detected by rubocop
-rw-r--r--app/controllers/projects/protected_branches_controller.rb1
-rw-r--r--app/controllers/projects/protected_tags_controller.rb1
-rw-r--r--app/controllers/projects/settings/repository_controller.rb1
-rw-r--r--app/models/concerns/protected_ref.rb4
4 files changed, 2 insertions, 5 deletions
diff --git a/app/controllers/projects/protected_branches_controller.rb b/app/controllers/projects/protected_branches_controller.rb
index a245a60910e..c2a55c9500a 100644
--- a/app/controllers/projects/protected_branches_controller.rb
+++ b/app/controllers/projects/protected_branches_controller.rb
@@ -1,5 +1,4 @@
class Projects::ProtectedBranchesController < Projects::ProtectedRefsController
-
protected
def protected_ref
diff --git a/app/controllers/projects/protected_tags_controller.rb b/app/controllers/projects/protected_tags_controller.rb
index 8f407b42ac8..ff132056aa4 100644
--- a/app/controllers/projects/protected_tags_controller.rb
+++ b/app/controllers/projects/protected_tags_controller.rb
@@ -1,5 +1,4 @@
class Projects::ProtectedTagsController < Projects::ProtectedRefsController
-
protected
def protected_ref
diff --git a/app/controllers/projects/settings/repository_controller.rb b/app/controllers/projects/settings/repository_controller.rb
index fb175b4a636..ff818d9e51a 100644
--- a/app/controllers/projects/settings/repository_controller.rb
+++ b/app/controllers/projects/settings/repository_controller.rb
@@ -19,7 +19,6 @@ module Projects
load_gon_index
end
-
def access_levels_options
#TODO: consider protected tags
#TODO: Refactor ProtectedBranch::PushAccessLevel so it doesn't mention branches
diff --git a/app/models/concerns/protected_ref.rb b/app/models/concerns/protected_ref.rb
index 3681ae63e3a..f6841669ab0 100644
--- a/app/models/concerns/protected_ref.rb
+++ b/app/models/concerns/protected_ref.rb
@@ -9,13 +9,13 @@ module ProtectedRef
delegate :matching, :matches?, :wildcard?, to: :ref_matcher
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)
end
end
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
def self.matching(ref_name, protected_refs: nil)