Fix user groups already assigned to an app not being filtered out

This commit is contained in:
Andrew Kingston 2022-09-23 15:42:44 +01:00
parent ae23c019a4
commit d62664c156
1 changed files with 2 additions and 1 deletions

View File

@ -39,6 +39,7 @@
$: fixedAppId = apps.getProdAppID(app.devId)
$: availableUsers = getAvailableUsers($usersFetch.rows, appUsers, data)
$: availableGroups = getAvailableGroups($groups, app.appId, search, data)
$: console.log(availableGroups)
$: valid = data?.length && !data?.some(x => !x.id?.length || !x.role?.length)
$: optionSections = {
...($licensing.groupsEnabled &&
@ -114,7 +115,7 @@
return (allGroups || []).filter(group => {
// Filter out assigned groups
const appIds = groups.actions.getGroupAppIds(group)
if (appIds.includes(appId)) {
if (appIds.includes(`app_${appId}`)) {
return false
}