Commit 192049a6 authored by Sean McGivern's avatar Sean McGivern
Browse files

Merge branch 'bvl-fix-system-hook-project-visibility' into 'master'

Use the correct project visibility in system hooks

Closes #39496

See merge request gitlab-org/gitlab-ce!15065
......@@ -83,7 +83,7 @@ def project_data(model)
project_id: model.id,
owner_name: owner.name,
owner_email: owner.respond_to?(:email) ? owner.email : "",
project_visibility: Project.visibility_levels.key(model.visibility_level_value).downcase
project_visibility: model.visibility.downcase
}
end
......
---
title: Use the correct visibility attribute for projects in system hooks
merge_request: 15065
author:
type: fixed
......@@ -63,6 +63,12 @@
:group_id, :user_id, :user_username, :user_name, :user_email, :group_access
)
end
it 'includes the correct project visibility level' do
data = event_data(project, :create)
expect(data[:project_visibility]).to eq('private')
end
end
context 'event names' do
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment