diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-07 21:10:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-07 21:10:36 +0300 |
commit | 39d41e02dca2139d0bbd88165affd818c9c82fb6 (patch) | |
tree | 4fb80e74a677eb672ec82e151648605f2d2afd47 /app/assets/javascripts/projects | |
parent | f276d294878605e289c84beb53032b40c53ba961 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/projects')
-rw-r--r-- | app/assets/javascripts/projects/settings/access_dropdown.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/assets/javascripts/projects/settings/access_dropdown.js b/app/assets/javascripts/projects/settings/access_dropdown.js index 3ca5bca4bf2..cb4fd5265da 100644 --- a/app/assets/javascripts/projects/settings/access_dropdown.js +++ b/app/assets/javascripts/projects/settings/access_dropdown.js @@ -48,11 +48,12 @@ export default class AccessDropdown { clicked: options => { const { $el, e } = options; const item = options.selectedObj; + const fossWithMergeAccess = !this.hasLicense && this.accessLevel === ACCESS_LEVELS.MERGE; e.preventDefault(); - if (!this.hasLicense) { - // We're not multiselecting quite yet with FOSS: + if (fossWithMergeAccess) { + // We're not multiselecting quite yet in "Merge" access dropdown, on FOSS: // remove all preselected items before selecting this item // https://gitlab.com/gitlab-org/gitlab/-/merge_requests/37499 this.accessLevelsData.forEach(level => { @@ -62,7 +63,7 @@ export default class AccessDropdown { if ($el.is('.is-active')) { if (this.noOneObj) { - if (item.id === this.noOneObj.id && this.hasLicense) { + if (item.id === this.noOneObj.id && !fossWithMergeAccess) { // remove all others selected items this.accessLevelsData.forEach(level => { if (level.id !== item.id) { |