-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add role migration check in user initialization
The commit includes adding a new query for role migration and incorporating it into the user initialization process to prevent user creation before migration finishes. Also, a custom error, MigrationNotFinishedException, has been added for better error handling regarding the migration completion status. This will help in ensuring accurate role assignment to new users.
- Loading branch information
Showing
3 changed files
with
36 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export class MigrationNotFinishedException extends Error { | ||
constructor (message) { | ||
super(message) | ||
|
||
this.name = this.constructor.name | ||
|
||
Error.captureStackTrace(this, this.constructor) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters