Class: Ci::PipelinePolicy
- Inherits:
-
BasePolicy
- Object
- DeclarativePolicy::Base
- BasePolicy
- Ci::PipelinePolicy
- Defined in:
- app/policies/ci/pipeline_policy.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#ref_protected?(user, project, tag, ref) ⇒ Boolean
52 53 54 55 56 57 58 59 60 |
# File 'app/policies/ci/pipeline_policy.rb', line 52 def ref_protected?(user, project, tag, ref) access = ::Gitlab::UserAccess.new(user, container: project) if tag !access.can_create_tag?(ref) else !access.can_update_branch?(ref) end end |