Commit 223ebf2c authored by Siddharth Asthana's avatar Siddharth Asthana Committed by Markus Koller

Fix Gitlab/DelegatePredicateMethods offenses

Changelog: other
EE: true
parent c11f8b46
......@@ -5,5 +5,4 @@ Gitlab/DelegatePredicateMethods:
- app/models/concerns/integrations/base_data_fields.rb
- app/models/project.rb
- ee/app/models/concerns/ee/ci/metadatable.rb
- ee/app/models/license.rb
- lib/gitlab/ci/trace/stream.rb
......@@ -315,7 +315,13 @@ class License < ApplicationRecord
EE_ALL_PLANS
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
cache.expire(CACHE_KEY)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment