diff options
author | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-11-08 15:59:48 +0300 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-11-09 16:44:20 +0300 |
commit | ebd51744729cb1b68754f8ba4d7f9adcec28d58d (patch) | |
tree | ff5cc2755ec46060dc83316c484471a3c61cd9f8 /app/models/lfs_object.rb | |
parent | 78ea074f42543ef352d497f84dba69c6955d843f (diff) |
Handle forks in Gitlab::Checks::LfsIntegrity
Diffstat (limited to 'app/models/lfs_object.rb')
-rw-r--r-- | app/models/lfs_object.rb | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/app/models/lfs_object.rb b/app/models/lfs_object.rb index b7cf96abe83..fc586fa216e 100644 --- a/app/models/lfs_object.rb +++ b/app/models/lfs_object.rb @@ -6,16 +6,8 @@ class LfsObject < ActiveRecord::Base mount_uploader :file, LfsObjectUploader - def storage_project(project) - if project && project.forked? - storage_project(project.forked_from_project) - else - project - end - end - def project_allowed_access?(project) - projects.exists?(storage_project(project).id) + projects.exists?(project.lfs_storage_project.id) end def self.destroy_unreferenced |