diff options
author | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-04-03 15:17:24 +0100 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-04-03 17:19:53 +0100 |
commit | 65f3d5062f081d8f8ebf727a3408650d90ec9711 (patch) | |
tree | 0246397bd1a234ce9f34b9145321a1c4e40c1cd4 /app/models/project.rb | |
parent | a7c71c7f292c9cdf892f7d33dfb52d7e16af28e6 (diff) | |
download | gitlab-ce-65f3d5062f081d8f8ebf727a3408650d90ec9711.tar.gz |
Extract ProtectedRef Concern
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 7681da36335..970de324a5b 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -898,14 +898,14 @@ class Project < ActiveRecord::Base return true if empty_repo? && default_branch_protected? @protected_branches ||= self.protected_branches.to_a - ProtectedBranch.matching(branch_name, protected_branches: @protected_branches).present? + ProtectedBranch.matching(branch_name, protected_refs: @protected_branches).present? end #TODO: Move elsewhere def protected_tag?(tag_name) #TODO: Check if memoization necessary, find way to have it work elsewhere @protected_tags ||= self.protected_tags.to_a - ProtectedTag.matching(tag_name, protected_tags: @protected_tags).present? + ProtectedTag.matching(tag_name, protected_refs: @protected_tags).present? end def user_can_push_to_empty_repo?(user) |