diff options
author | Jasper Maes <jaspermaes.jm@gmail.com> | 2018-12-15 10:06:56 +0100 |
---|---|---|
committer | Jasper Maes <jaspermaes.jm@gmail.com> | 2018-12-16 10:48:41 +0100 |
commit | 56296f1edadf2bc5f7741cbb3f97cb41f090aac6 (patch) | |
tree | 5a21667acd7d431f155d12227181dcfc6d21cba8 /lib/declarative_policy.rb | |
parent | 8b4602041cf2c4a8738a4796d78720017249249f (diff) | |
download | gitlab-ce-56296f1edadf2bc5f7741cbb3f97cb41f090aac6.tar.gz |
Remove rails4 specific code
Diffstat (limited to 'lib/declarative_policy.rb')
-rw-r--r-- | lib/declarative_policy.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/declarative_policy.rb b/lib/declarative_policy.rb index 5e22523e45a..7ba48ae9c79 100644 --- a/lib/declarative_policy.rb +++ b/lib/declarative_policy.rb @@ -22,14 +22,10 @@ module DeclarativePolicy key = Cache.policy_key(user, subject) cache[key] ||= - if Gitlab.rails5? - # to avoid deadlocks in multi-threaded environment when - # autoloading is enabled, we allow concurrent loads, - # https://gitlab.com/gitlab-org/gitlab-ce/issues/48263 - ActiveSupport::Dependencies.interlock.permit_concurrent_loads do - class_for(subject).new(user, subject, opts) - end - else + # to avoid deadlocks in multi-threaded environment when + # autoloading is enabled, we allow concurrent loads, + # https://gitlab.com/gitlab-org/gitlab-ce/issues/48263 + ActiveSupport::Dependencies.interlock.permit_concurrent_loads do class_for(subject).new(user, subject, opts) end end |