diff options
Diffstat (limited to 'config/initializers/declarative_policy_cached_attributes.rb')
-rw-r--r-- | config/initializers/declarative_policy_cached_attributes.rb | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/config/initializers/declarative_policy_cached_attributes.rb b/config/initializers/declarative_policy_cached_attributes.rb deleted file mode 100644 index c05a7609fec..00000000000 --- a/config/initializers/declarative_policy_cached_attributes.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# This module memoizes some attributes to reduce memory allocations. -# -# See https://gitlab.com/gitlab-org/gitlab/-/issues/420623 -# See https://gitlab.com/gitlab-org/ruby/gems/declarative-policy/-/merge_requests/52 -module DeclarativePolicyCachedAttributes - def ability_map - @ability_map ||= super - end - - def conditions - @conditions ||= super - end - - def global_actions - @global_actions ||= super - end - - def delegations - @delegations ||= super - end -end - -DeclarativePolicy::Base.singleton_class.prepend(DeclarativePolicyCachedAttributes) |