Merge remote-tracking branch 'origin' into scim

This commit is contained in:
Tuan Dang
2024-02-21 12:46:37 -08:00
37 changed files with 3229 additions and 622 deletions
@@ -57,6 +57,12 @@ export const secretDALFactory = (db: TDbClient) => {
type: el.type,
...(el.type === SecretType.Personal ? { userId } : {})
});
if (el.type === SecretType.Shared) {
void bd.orWhere({
secretBlindIndex: el.blindIndex,
type: SecretType.Personal
});
}
});
})
.delete()
@@ -96,7 +96,11 @@ export const superAdminServiceFactory = ({
const initialOrganizationName = appCfg.INITIAL_ORGANIZATION_NAME ?? "Admin Org";
await orgService.createOrganization(userInfo.user.id, userInfo.user.email, initialOrganizationName);
const organization = await orgService.createOrganization(
userInfo.user.id,
userInfo.user.email,
initialOrganizationName
);
await updateServerCfg({ initialized: true });
const token = await authService.generateUserTokens({
@@ -106,7 +110,7 @@ export const superAdminServiceFactory = ({
organizationId: undefined
});
// TODO(akhilmhdh-pg): telemetry service
return { token, user: userInfo };
return { token, user: userInfo, organization };
};
return {