Skip to content
代码片段 群组 项目
未验证 提交 4f6a9fcf 编辑于 作者: Lorenz van Herwaarden's avatar Lorenz van Herwaarden 提交者: GitLab
浏览文件

Do not show username for vulnerability details system notes

This makes sure the system notes in the vulnerability details
discussions section do not show the username.

Changelog: changed
EE: true
上级 c420152c
No related branches found
No related tags found
无相关合并请求
......@@ -52,6 +52,11 @@ export default {
required: false,
default: true,
},
isSystemNote: {
type: Boolean,
required: false,
default: false,
},
},
computed: {
noteId() {
......@@ -72,6 +77,7 @@ export default {
:author="author"
:created-at="createdAt"
:show-spinner="false"
:is-system-note="isSystemNote"
class="gl-pb-0 gl-pl-0"
>
<slot name="header-message"><template v-if="createdAt">&middot;</template></slot>
......
......@@ -34,6 +34,7 @@ export default {
:author="systemNote.author"
:created-at="systemNote.createdAt"
:icon-name="systemNote.systemNoteIconName"
is-system-note
icon-class="timeline-icon m-0"
class="m-3"
>
......
......@@ -38,6 +38,7 @@ describe('Event Item', () => {
author: propsData.author,
createdAt: propsData.createdAt,
showSpinner: false,
isSystemNote: false,
});
});
......@@ -126,4 +127,20 @@ describe('Event Item', () => {
expect(noteHeader().text()).not.toContain('·');
});
});
it('passes `isSystemNote` prop to note header component', () => {
const propsData = {
id: 123,
createdAt: 'createdAt',
headerMessage: 'header message',
author: {
name: 'Tanuki',
username: 'gitlab',
},
isSystemNote: true,
};
mountComponent({ propsData });
expect(noteHeader().props('isSystemNote')).toBe(true);
});
});
......@@ -50,6 +50,7 @@ describe('History Entry', () => {
author: systemNote.author,
createdAt: systemNote.createdAt,
iconName: systemNote.systemNoteIconName,
isSystemNote: true,
});
});
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册