diff --git a/core/components/AdminVault/index.js b/core/components/AdminVault/index.js index 28a2a95cb..adaf74229 100644 --- a/core/components/AdminVault/index.js +++ b/core/components/AdminVault/index.js @@ -398,8 +398,13 @@ export default class AdminVault { } if (typeof permissions !== 'undefined') this.admins[adminIndex].permissions = permissions; + //Prevent race condition, will allow the session to be updated before refreshing socket.io + //sessions which will cause reauth and closing of the temp password modal on first access + setTimeout(() => { + this.refreshOnlineAdmins().catch((e) => { }); + }, 250); + //Saving admin file - this.refreshOnlineAdmins().catch((e) => { }); try { await this.writeAdminsFile(); return (password !== null) ? this.admins[adminIndex].password_hash : true; @@ -549,7 +554,8 @@ export default class AdminVault { } this.admins = jsonData; - this.refreshOnlineAdmins().catch((e) => { }); + //NOTE: since this runs only at the start, nobody is online yet + // this.refreshOnlineAdmins().catch((e) => { }); if (migrated) { try { await this.writeAdminsFile(); diff --git a/docs/dev_notes.md b/docs/dev_notes.md index c866b206e..09755a4f7 100644 --- a/docs/dev_notes.md +++ b/docs/dev_notes.md @@ -4,6 +4,7 @@ - [x] reduce bodyparser limit - double check - [x] fix the timer issue that keeps requests in memory for longer than needed - [x] implement rps/heap watcher +- [x] fix issue where the forced password change on save reloads the page instead of moving to the identifiers tab - [ ] merge prs - [ ] feat(menu): add keymapping for tp to waypoint (PR #886) - [ ] fix(nui/PlayerModel): require OneSync for bring and goto (PR #851) @@ -22,7 +23,6 @@ seems like it just refreshes the page - live console bookmarks - [ ] build: generate fxmanifest files list dynamically -- [ ] fix issue where the forced password change on save reloads the page instead of moving to the identifiers tab - [ ] easter egg with some old music? https://www.youtube.com/watch?v=nNoaXej0Jeg - [ ] update docs on development?