Skip to content
代码片段 群组 项目
提交 223ebf2c 编辑于 作者: Siddharth Asthana's avatar Siddharth Asthana 提交者: Markus Koller
浏览文件

Fix Gitlab/DelegatePredicateMethods offenses

Changelog: other
EE: true
上级 c11f8b46
No related branches found
No related tags found
无相关合并请求
...@@ -5,5 +5,4 @@ Gitlab/DelegatePredicateMethods: ...@@ -5,5 +5,4 @@ Gitlab/DelegatePredicateMethods:
- app/models/concerns/integrations/base_data_fields.rb - app/models/concerns/integrations/base_data_fields.rb
- app/models/project.rb - app/models/project.rb
- ee/app/models/concerns/ee/ci/metadatable.rb - ee/app/models/concerns/ee/ci/metadatable.rb
- ee/app/models/license.rb
- lib/gitlab/ci/trace/stream.rb - lib/gitlab/ci/trace/stream.rb
...@@ -315,7 +315,13 @@ def all_plans ...@@ -315,7 +315,13 @@ def all_plans
EE_ALL_PLANS EE_ALL_PLANS
end end
delegate :block_changes?, :feature_available?, to: :current, allow_nil: true def block_changes?
!!current&.block_changes?
end
def feature_available?(feature)
!!current&.feature_available?(feature)
end
def reset_current def reset_current
cache.expire(CACHE_KEY) cache.expire(CACHE_KEY)
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册