(core) have user.Name come from database for websocket users

Summary: The name of a user for actions made using a websocket until now could be inconsistent with that seen by other means. This draws the name from the database, rather than from session information that may have been cached from an identity provider.

Test Plan: added test

Reviewers: dsagal

Reviewed By: dsagal

Subscribers: dsagal

Differential Revision: https://phab.getgrist.com/D3379
This commit is contained in:
Paul Fitzpatrick
2022-04-13 16:22:35 -04:00
parent dea1a8ba1b
commit c1af5a9803
2 changed files with 19 additions and 7 deletions

View File

@@ -819,12 +819,13 @@ export class FlexServer implements GristServer {
}
public addComm() {
if (this._check('comm', 'start')) { return; }
if (this._check('comm', 'start', 'homedb')) { return; }
this._comm = new Comm(this.server, {
settings: this.settings,
sessions: this._sessions,
hosts: this._hosts,
httpsServer: this.httpsServer,
dbManager: this._dbManager,
});
}
/**