diff options
author | Michael Kozono <mkozono@gmail.com> | 2018-09-20 12:32:54 -0700 |
---|---|---|
committer | Michael Kozono <mkozono@gmail.com> | 2018-09-24 12:11:26 -0700 |
commit | f107bc69e34f79ea8faaa154caefe56948b8dd68 (patch) | |
tree | 60e65bdf6fd939d3d15113fd1f7a53c12038e5dc /app/models/project.rb | |
parent | 45cf64c827270d66a88d483bb3f9043a90301255 (diff) | |
download | gitlab-ce-f107bc69e34f79ea8faaa154caefe56948b8dd68.tar.gz |
Simplify by using Gitlab::SafeRequestStore
These are clear wins.
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 3e14064a556..b18efa41a33 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -2272,11 +2272,7 @@ class Project < ActiveRecord::Base end end - if RequestStore.active? - RequestStore.fetch("project-#{id}:branch-#{branch_name}:user-#{user.id}:branch_allows_collaboration") do - check_access.call - end - else + Gitlab::SafeRequestStore.fetch("project-#{id}:branch-#{branch_name}:user-#{user.id}:branch_allows_collaboration") do check_access.call end end |