diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-02-28 22:36:55 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-02-28 22:36:55 +0300 |
commit | 965dc28691e2d70b7040e28d90ccbc3721a9e416 (patch) | |
tree | 84258f35b72f2e7ce6a7198db66032df4ad5aadb /app/models/lfs_object.rb | |
parent | e3fafa7632e038927085cf8c8228c93be44b36bd (diff) | |
parent | 7fabc892f251740dbd9a4755baede662e6854870 (diff) |
Merge commit '7fabc892f251740dbd9a4755baede662e6854870' into object-storage-ee-to-ce-backport
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 0056b0f80f4..38b8c41024a 100644 --- a/app/models/lfs_object.rb +++ b/app/models/lfs_object.rb @@ -8,16 +8,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 |