Stop role from auto-changing if user manually selected a role during account creation (#13320)

This commit is contained in:
Gabriel Pordeus Santos 2026-06-03 15:06:06 -03:00 committed by GitHub
parent 7308dad19a
commit be51948146
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 1 deletions

View File

@ -36,6 +36,7 @@
v-focus="true"
showSearch
optionFilterProp="label"
@change="onRoleChange"
:filterOption="(input, option) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}">
@ -211,6 +212,7 @@ export default {
domain: { id: null, loading: false },
domainsList: [],
dom: null,
roleManuallySelected: false,
roleLoading: false,
roles: [],
timeZoneLoading: false,
@ -299,8 +301,13 @@ export default {
})
}
},
onRoleChange (newRoleId) {
if (newRoleId) {
this.roleManuallySelected = true
}
},
setDefaultRole () {
if (this.roles.length === 0) return
if (this.roles.length === 0 || this.roleManuallySelected) return
let targetRoleType = null