Skip to content

Commit 7bd00c6

Browse files
authored
[fga] additional check (#18701)
1 parent e2ae3e3 commit 7bd00c6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

components/server/src/authorization/relationship-updater.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,13 @@ export class RelationshipUpdater {
8787
log.info({ userId: user.id }, `Finished updating relationships.`, {
8888
duration: new Date().getTime() - before,
8989
});
90+
91+
// let's double check the migration worked.
92+
if (!(await this.isMigrated(user))) {
93+
log.error({ userId: user.id }, `User migration failed.`, {
94+
markedMigrated: user.additionalData?.fgaRelationshipsVersion === RelationshipUpdater.version,
95+
});
96+
}
9097
return user;
9198
});
9299
} finally {

0 commit comments

Comments
 (0)