Commit d0bb69c0 authored by Luke Bennett's avatar Luke Bennett

Resolve CE/EE diffs in dropdown_user

Part of single codebase changes.
parent e63b65cd
...@@ -18,6 +18,7 @@ export default class DropdownUser extends DropdownAjaxFilter { ...@@ -18,6 +18,7 @@ export default class DropdownUser extends DropdownAjaxFilter {
group_id: this.getGroupId(), group_id: this.getGroupId(),
project_id: this.getProjectId(), project_id: this.getProjectId(),
current_user: true, current_user: true,
...this.projectOrGroupId(),
}, },
onLoadingFinished: () => { onLoadingFinished: () => {
this.hideCurrentUser(); this.hideCurrentUser();
...@@ -36,4 +37,17 @@ export default class DropdownUser extends DropdownAjaxFilter { ...@@ -36,4 +37,17 @@ export default class DropdownUser extends DropdownAjaxFilter {
getProjectId() { getProjectId() {
return this.input.getAttribute('data-project-id'); 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment