提交 42e564c6 编写于 作者: P Phil Hughes

Merge branch 'dropdown-user-scb' into 'master'

Resolve CE/EE diffs in dropdown_user

Closes gitlab-ee#10494

See merge request gitlab-org/gitlab-ce!28577
......@@ -18,6 +18,7 @@ export default class DropdownUser extends DropdownAjaxFilter {
group_id: this.getGroupId(),
project_id: this.getProjectId(),
current_user: true,
...this.projectOrGroupId(),
},
onLoadingFinished: () => {
this.hideCurrentUser();
......@@ -36,4 +37,17 @@ export default class DropdownUser extends DropdownAjaxFilter {
getProjectId() {
return this.input.getAttribute('data-project-id');
}
projectOrGroupId() {
const projectId = this.getProjectId();
const groupId = this.getGroupId();
if (groupId) {
return {
group_id: groupId,
};
}
return {
project_id: projectId,
};
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册