diff options
Diffstat (limited to 'app/models/protected_branch.rb')
-rw-r--r-- | app/models/protected_branch.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/protected_branch.rb b/app/models/protected_branch.rb index 3d32144e0f8..b4e2d17c3e5 100644 --- a/app/models/protected_branch.rb +++ b/app/models/protected_branch.rb @@ -10,6 +10,8 @@ class ProtectedBranch < ApplicationRecord scope :allowing_force_push, -> { where(allow_force_push: true) } + scope :get_ids_by_name, -> (name) { where(name: name).pluck(:id) } + protected_ref_access_levels :merge, :push def self.protected_ref_accessible_to?(ref, user, project:, action:, protected_refs: nil) |