fix: show all teams to owner

This commit is contained in:
sk1982 2024-04-17 07:51:32 -04:00
parent 607c5cacf8
commit 5b1e8ffc26

View File

@ -68,6 +68,9 @@ export const getTeams = async ({ showUnlisted, uuids, user }:
.as('userCount'),
eb('team.uuid', '=', user?.team!).as('isMember'),
eb.or([
...(hasPermission(user?.permissions, UserPermissions.OWNER) ? [
eb.lit(true)
] : []),
eb('team.visibility', '=', Visibility.PUBLIC),
eb('team.uuid', '=', user?.team!),
...(showUnlisted ? [