Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
223ebf2c
Commit
223ebf2c
authored
Dec 04, 2021
by
Siddharth Asthana
Committed by
Markus Koller
Jan 10, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Gitlab/DelegatePredicateMethods offenses
Changelog: other EE: true
parent
c11f8b46
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
.rubocop_todo/gitlab/delegate_predicate_methods.yml
.rubocop_todo/gitlab/delegate_predicate_methods.yml
+0
-1
ee/app/models/license.rb
ee/app/models/license.rb
+7
-1
No files found.
.rubocop_todo/gitlab/delegate_predicate_methods.yml
View file @
223ebf2c
...
@@ -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
ee/app/models/license.rb
View file @
223ebf2c
...
@@ -315,7 +315,13 @@ class License < ApplicationRecord
...
@@ -315,7 +315,13 @@ class License < ApplicationRecord
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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment