mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-19 07:33:18 +00:00
feat: resolving bugs in checklist testing
This commit is contained in:
@@ -40,7 +40,7 @@ export const groupDALFactory = (db: TDbClient) => {
|
||||
.where(`${TableName.Membership}.scope`, AccessScope.Organization)
|
||||
.join(TableName.Membership, `${TableName.Groups}.id`, `${TableName.Membership}.actorGroupId`)
|
||||
.join(TableName.MembershipRole, `${TableName.MembershipRole}.membershipId`, `${TableName.Membership}.id`)
|
||||
.join(TableName.Role, `${TableName.MembershipRole}.customRoleId`, `${TableName.Role}.id`)
|
||||
.leftJoin(TableName.Role, `${TableName.MembershipRole}.customRoleId`, `${TableName.Role}.id`)
|
||||
.select(selectAllTableCols(TableName.Groups))
|
||||
// cr stands for custom role
|
||||
.select(db.ref("id").as("crId").withSchema(TableName.Role))
|
||||
@@ -210,7 +210,7 @@ export const groupDALFactory = (db: TDbClient) => {
|
||||
.where(`${TableName.Membership}.scope`, AccessScope.Organization)
|
||||
.where((queryBuilder) => {
|
||||
Object.entries(filter).forEach(([key, value]) => {
|
||||
void queryBuilder.where(`${TableName.Membership}.${key}`, value);
|
||||
void queryBuilder.where(`${TableName.Groups}.${key}`, value);
|
||||
});
|
||||
})
|
||||
.select(
|
||||
|
||||
@@ -223,16 +223,20 @@ export const groupServiceFactory = ({
|
||||
}
|
||||
}
|
||||
|
||||
const [updated] = await groupDAL.update(
|
||||
{
|
||||
id: group.id
|
||||
},
|
||||
{
|
||||
name,
|
||||
slug: slug ? slugify(slug) : undefined
|
||||
},
|
||||
tx
|
||||
);
|
||||
let updated = group;
|
||||
|
||||
if (name || slug) {
|
||||
[updated] = await groupDAL.update(
|
||||
{
|
||||
id: group.id
|
||||
},
|
||||
{
|
||||
name,
|
||||
slug: slug ? slugify(slug) : undefined
|
||||
},
|
||||
tx
|
||||
);
|
||||
}
|
||||
|
||||
if (role) {
|
||||
const membership = await membershipGroupDAL.findOne(
|
||||
|
||||
Reference in New Issue
Block a user