mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-27 13:34:25 +03:00
ezqms-730: better check for roles when changing members (#5527)
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
parent
844e393460
commit
220f6eaeb4
@ -242,8 +242,7 @@
|
||||
|
||||
if (removedMembersSet.size > 0 && rolesAssignment !== undefined) {
|
||||
for (const [key, value] of Object.entries(rolesAssignment)) {
|
||||
rolesAssignment[key as Ref<Role>] =
|
||||
value !== undefined ? value.filter((m) => !removedMembersSet.has(m)) : undefined
|
||||
rolesAssignment[key as Ref<Role>] = value != null ? value.filter((m) => !removedMembersSet.has(m)) : undefined
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -140,8 +140,7 @@
|
||||
|
||||
if (removedMembersSet.size > 0 && rolesAssignment !== undefined) {
|
||||
for (const [key, value] of Object.entries(rolesAssignment)) {
|
||||
rolesAssignment[key as Ref<Role>] =
|
||||
value !== undefined ? value.filter((m) => !removedMembersSet.has(m)) : undefined
|
||||
rolesAssignment[key as Ref<Role>] = value != null ? value.filter((m) => !removedMembersSet.has(m)) : undefined
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -302,8 +302,7 @@
|
||||
|
||||
if (removedMembersSet.size > 0 && rolesAssignment !== undefined) {
|
||||
for (const [key, value] of Object.entries(rolesAssignment)) {
|
||||
rolesAssignment[key as Ref<Role>] =
|
||||
value !== undefined ? value.filter((m) => !removedMembersSet.has(m)) : undefined
|
||||
rolesAssignment[key as Ref<Role>] = value != null ? value.filter((m) => !removedMembersSet.has(m)) : undefined
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user