Commit 6eb47ae9 authored by Markus Koller's avatar Markus Koller

Merge branch 'issue_license_324629' into 'master'

Fix Gitlab/DelegatePredicateMethods offenses

See merge request gitlab-org/gitlab!76007
parents 667125f4 223ebf2c
......@@ -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