diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-09-26 14:49:22 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-09-26 14:49:22 +0300 |
commit | 65b9768ccfbdc3de682d66430601cf3af1b2a2f8 (patch) | |
tree | b414c17b43b098b92b27cb1bb2cf1ffe40644f0c /app/services/system_hooks_service.rb | |
parent | edd2143d35d439e203d53b5e413f71e9f02db139 (diff) | |
download | gitlab-ce-65b9768ccfbdc3de682d66430601cf3af1b2a2f8.tar.gz |
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.rb | 6 |
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!({ |