core: remove tfa & webauthn from registered fields

This commit is contained in:
undefined committed 2025-12-07 03:06:59 +08:00
1 parent ddf003c4c5
commit 770b2fc2ec
4 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "5.0.0-beta.14",
"version": "5.0.0-beta.15",
"bin": "bin/hydrooj.js",
"main": "src/plugin-api",
"module": "src/plugin-api",
+2 -2
View File
@@ -101,7 +101,7 @@ export class User {
this.role = dudoc.role || 'default';
this.domains = udoc.domains || [];
this.tfa = !!udoc.tfa;
this.authn = (udoc.authenticators || []).length > 0;
this.authn = !!udoc.authenticators?.length;
if (dudoc.group) this.group = dudoc.group;
const load = (settings: Record<string, ReturnType<typeof setting.Setting>>, source: any) => {
for (const key in settings) {
@@ -163,7 +163,7 @@ export class User {
}
getFields(type: 'public' | 'private' = 'public') {
const fields = ['_id', 'uname', 'mail', 'perm', 'role', 'priv', 'regat', 'loginat', 'tfa', 'authn', 'avatar'].concat(this._publicFields);
const fields = ['_id', 'uname', 'mail', 'perm', 'role', 'priv', 'regat', 'loginat', 'avatar'].concat(this._publicFields);
return type === 'public' ? fields : fields.concat(this._privateFields);
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/ui-default",
"version": "4.58.0-beta.15",
"version": "4.58.0-beta.16",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "index.ts",
@@ -130,7 +130,7 @@
{% endif %}
</div>
</div>
<div class="section">
<div class="section section--clarifications">
<div class="section__header">
<h1 class="section__title">{{ _('Contest Clarifications') }}</h1>
</div>