diff options
author | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-11-08 12:59:48 +0000 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-11-09 13:44:20 +0000 |
commit | ebd51744729cb1b68754f8ba4d7f9adcec28d58d (patch) | |
tree | ff5cc2755ec46060dc83316c484471a3c61cd9f8 /app/models/lfs_object.rb | |
parent | 78ea074f42543ef352d497f84dba69c6955d843f (diff) | |
download | gitlab-ce-ebd51744729cb1b68754f8ba4d7f9adcec28d58d.tar.gz |
Handle forks in Gitlab::Checks::LfsIntegrityjej/fix-lfs-integrity-with-forks
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 |