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:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-09-26 15:49:22 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-09-26 15:49:22 +0400
commit65b9768ccfbdc3de682d66430601cf3af1b2a2f8 (patch)
treeb414c17b43b098b92b27cb1bb2cf1ffe40644f0c /app/services/system_hooks_service.rb
parentedd2143d35d439e203d53b5e413f71e9f02db139 (diff)
Group ownership completely based on users_groups relation now
Before we have only owner_id to determine group owner With multiple owners per group we should get rid of owner_id in group. So from now @group.owner will always be nil but @group.owners return an actual array of users who can admin this group
Diffstat (limited to 'app/services/system_hooks_service.rb')
-rw-r--r--app/services/system_hooks_service.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/services/system_hooks_service.rb b/app/services/system_hooks_service.rb
index c872b27ba39..39aec943f75 100644
--- a/app/services/system_hooks_service.rb
+++ b/app/services/system_hooks_service.rb
@@ -23,13 +23,15 @@ class SystemHooksService
case model
when Project
+ owner = model.owner
+
data.merge!({
name: model.name,
path: model.path,
path_with_namespace: model.path_with_namespace,
project_id: model.id,
- owner_name: model.owner.name,
- owner_email: model.owner.email
+ owner_name: owner.name,
+ owner_email: owner.respond_to?(:email) ? owner.email : nil
})
when User
data.merge!({