Add groups to ssh hosts allowed principals bot improvements

This commit is contained in:
carlosmonastyrski
2025-05-02 13:36:05 -03:00
parent 36916704be
commit 7d0574087c
3 changed files with 24 additions and 26 deletions
+1 -5
View File
@@ -160,11 +160,7 @@ export const groupDALFactory = (db: TDbClient) => {
const findGroupsByProjectId = async (projectId: string, tx?: Knex) => {
try {
const docs = await (tx || db.replicaNode())(TableName.Groups)
.leftJoin(
TableName.GroupProjectMembership,
`${TableName.Groups}.id`,
`${TableName.GroupProjectMembership}.groupId`
)
.join(TableName.GroupProjectMembership, `${TableName.Groups}.id`, `${TableName.GroupProjectMembership}.groupId`)
.where(`${TableName.GroupProjectMembership}.projectId`, projectId)
.select(selectAllTableCols(TableName.Groups));
return docs;