Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/feature/gitaly.rb')
-rw-r--r--lib/feature/gitaly.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/feature/gitaly.rb b/lib/feature/gitaly.rb
index fd798862fa8..eadf98e090e 100644
--- a/lib/feature/gitaly.rb
+++ b/lib/feature/gitaly.rb
@@ -53,11 +53,19 @@ module Feature
end
def project_actor(container)
- ::Feature::Gitaly::ActorWrapper.new(::Project, container.id) if container.is_a?(::Project)
+ return actor_wrapper(::Project, container.id) if container.is_a?(::Project)
+ return actor_wrapper(::Project, container.project.id) if container.is_a?(DesignManagement::Repository)
end
def group_actor(container)
- ::Feature::Gitaly::ActorWrapper.new(::Group, container.namespace_id) if container.is_a?(::Project)
+ return actor_wrapper(::Group, container.namespace_id) if container.is_a?(::Project)
+ return actor_wrapper(::Group, container.project.namespace_id) if container.is_a?(DesignManagement::Repository)
+ end
+
+ private
+
+ def actor_wrapper(actor_type, id)
+ ::Feature::Gitaly::ActorWrapper.new(actor_type, id)
end
end
end