Merge pull request #9915 from Budibase/fix/9441-group-roles
fix roleId being undefined leading to group role overriding incorrectly
This commit is contained in:
commit
1abab9421e
|
@ -35,8 +35,6 @@ export function updateAppRole(
|
||||||
user.roleId = roles.BUILTIN_ROLE_IDS.ADMIN
|
user.roleId = roles.BUILTIN_ROLE_IDS.ADMIN
|
||||||
} else if (!user.roleId && !user?.userGroups?.length) {
|
} else if (!user.roleId && !user?.userGroups?.length) {
|
||||||
user.roleId = roles.BUILTIN_ROLE_IDS.PUBLIC
|
user.roleId = roles.BUILTIN_ROLE_IDS.PUBLIC
|
||||||
} else if (user?.userGroups?.length) {
|
|
||||||
user.roleId = undefined
|
|
||||||
}
|
}
|
||||||
|
|
||||||
delete user.roles
|
delete user.roles
|
||||||
|
|
Loading…
Reference in New Issue