core: fix User.serialize (#986)

This commit is contained in:
Baoshuo authored and GitHub committed 2025-06-03 07:01:05 +01:00
1 parent 3a9755556e
commit 76a822c179
1 file changed
+1 -1
+1 -1
View File
@@ -159,7 +159,7 @@ export class User {
return user;
}
serialize(_, h) {
serialize(h) {
if (!this._isPrivate) {
const fields = ['_id', 'uname', 'mail', 'perm', 'role', 'priv', 'regat', 'loginat', 'tfa', 'authn'];
if (h?.user?.hasPerm(PERM.PERM_VIEW_DISPLAYNAME)) fields.push('displayName');