summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 714a15ade9c..d821f948db0 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -1066,6 +1066,16 @@ class Project < ActiveRecord::Base
end
end
+ # This will return all `lfs_objects` that are accessible to the project.
+ # So this might be `self.lfs_objects` if the project is not part of a fork
+ # network, or it is the base of the fork network.
+ #
+ # TODO: refactor this to get the correct lfs objects when implementing
+ # https://gitlab.com/gitlab-org/gitlab-ce/issues/39769
+ def lfs_objects_for_project
+ lfs_storage_project.lfs_objects
+ end
+
def personal?
!group
end