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:
authorAlex <alex.house@performancehorizon.com>2014-05-12 13:23:24 +0400
committerAlex <alex.house@performancehorizon.com>2014-05-12 13:23:24 +0400
commit31b0e14981d57c2f38734872181c6dc49a2e6f5a (patch)
tree03b43f3c1f5c8f6e440dbfafaee9773764805a36 /app/services/system_hooks_service.rb
parentc355b9abfe441da1d164cb1a27a8e6dbee266bb2 (diff)
Adding project visibility to system hooks
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 4969198b8c2..41014f199d5 100644
--- a/app/services/system_hooks_service.rb
+++ b/app/services/system_hooks_service.rb
@@ -31,7 +31,8 @@ class SystemHooksService
path_with_namespace: model.path_with_namespace,
project_id: model.id,
owner_name: owner.name,
- owner_email: owner.respond_to?(:email) ? owner.email : nil
+ owner_email: owner.respond_to?(:email) ? owner.email : nil,
+ project_visibility: Project.visibility_levels.key(model.visibility_level_field).downcase
})
when User
data.merge!({
@@ -46,7 +47,8 @@ class SystemHooksService
project_id: model.project_id,
user_name: model.user.name,
user_email: model.user.email,
- project_access: model.human_access
+ project_access: model.human_access,
+ project_visibility: Project.visibility_levels.key(model.project.visibility_level_field).downcase
})
end
end