Renaming function to more accurately reflect its group app ID lookup purpose.
This commit is contained in:
parent
25b8f0ca3b
commit
31208b1f8f
|
@ -53,7 +53,7 @@
|
||||||
: publishedApps.filter(app => {
|
: publishedApps.filter(app => {
|
||||||
return userGroups.find(group => {
|
return userGroups.find(group => {
|
||||||
return groups.actions
|
return groups.actions
|
||||||
.getGroupApps(group)
|
.getGroupAppIds(group)
|
||||||
.map(role => apps.extractAppId(role))
|
.map(role => apps.extractAppId(role))
|
||||||
.includes(app.appId)
|
.includes(app.appId)
|
||||||
})
|
})
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
$: group = $groups.find(x => x._id === groupId)
|
$: group = $groups.find(x => x._id === groupId)
|
||||||
$: filtered = $users.data
|
$: filtered = $users.data
|
||||||
$: groupApps = $apps.filter(app =>
|
$: groupApps = $apps.filter(app =>
|
||||||
groups.actions.getGroupApps(group).includes(app.appId)
|
groups.actions.getGroupAppIds(group).includes(app.appId)
|
||||||
)
|
)
|
||||||
$: {
|
$: {
|
||||||
if (loaded && !group?._id) {
|
if (loaded && !group?._id) {
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
if (!group.roles) {
|
if (!group.roles) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return groups.actions.getGroupApps(group).includes(fixedAppId)
|
return groups.actions.getGroupAppIds(group).includes(fixedAppId)
|
||||||
})
|
})
|
||||||
|
|
||||||
async function removeUser(user) {
|
async function removeUser(user) {
|
||||||
|
@ -114,7 +114,9 @@
|
||||||
autoWidth
|
autoWidth
|
||||||
quiet
|
quiet
|
||||||
value={group.roles[
|
value={group.roles[
|
||||||
groups.actions.getGroupApps(group).find(x => x === fixedAppId)
|
groups.actions
|
||||||
|
.getGroupAppIds(group)
|
||||||
|
.find(x => x === fixedAppId)
|
||||||
]}
|
]}
|
||||||
allowPublic={false}
|
allowPublic={false}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -113,7 +113,7 @@
|
||||||
search = search?.toLowerCase()
|
search = search?.toLowerCase()
|
||||||
return (allGroups || []).filter(group => {
|
return (allGroups || []).filter(group => {
|
||||||
// Filter out assigned groups
|
// Filter out assigned groups
|
||||||
const appIds = groups.actions.getGroupApps(group)
|
const appIds = groups.actions.getGroupAppIds(group)
|
||||||
if (appIds.includes(appId)) {
|
if (appIds.includes(appId)) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@ export function createGroupsStore() {
|
||||||
await getGroup(groupId)
|
await getGroup(groupId)
|
||||||
},
|
},
|
||||||
|
|
||||||
getGroupApps: group => {
|
getGroupAppIds: group => {
|
||||||
return Object.keys(group?.roles || {})
|
return Object.keys(group?.roles || {})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue