mirror of
https://github.com/rommapp/romm.git
synced 2026-11-29 10:01:00 +01:00
fix(user): confirm a user's email only through an explicit admin action
pr-ready step 2 follow-up. The frontend resends the email on every save, so trusting it on any admin save let enabling an invitee vouch for an address nobody checked. An admin now sends confirm_email (the address they saw) from a switch in the edit dialog; a changed address answers 409. UserSchema exposes email_trusted and the edit audit records it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,8 @@ class UserForm(BaseModel):
|
||||
password: str | None = None
|
||||
current_password: str | None = None
|
||||
email: str | None = None
|
||||
# The address an admin confirms; it must still be the user's current email.
|
||||
confirm_email: str | None = None
|
||||
role: str | None = None
|
||||
enabled: bool | None = None
|
||||
ra_username: str | None = Field(default=None, max_length=TEXT_FIELD_LENGTH)
|
||||
|
||||
@@ -29,6 +29,7 @@ class UserSchema(BaseModel):
|
||||
oauth_scopes: list[str]
|
||||
has_password: bool
|
||||
email_managed_by_oidc: bool
|
||||
email_trusted: bool
|
||||
avatar_path: str
|
||||
last_login: UTCDatetime | None
|
||||
last_active: UTCDatetime | None
|
||||
|
||||
@@ -59,6 +59,7 @@ router = APIRouter(
|
||||
_USER_EDIT_AUDIT_FIELDS: Final = (
|
||||
"username",
|
||||
"email",
|
||||
"email_trusted",
|
||||
"hashed_password",
|
||||
"role",
|
||||
"enabled",
|
||||
@@ -552,13 +553,21 @@ async def update_user(
|
||||
cleaned_data["email"] = new_email.lower() or None
|
||||
cleaned_data["email_trusted"] = by_admin
|
||||
|
||||
# Saving an unchanged email as an admin vouches for it, but only for the
|
||||
# address the admin saw, in case the user changed it meanwhile.
|
||||
vouch_for = (
|
||||
email
|
||||
if by_admin and new_email is None and email and not db_user.email_trusted
|
||||
else None
|
||||
)
|
||||
confirm_email = form_data.confirm_email if new_email is None else None
|
||||
if confirm_email and not by_admin:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_403_FORBIDDEN,
|
||||
detail="Only an administrator can confirm an email",
|
||||
)
|
||||
confirmed = False
|
||||
if confirm_email and not db_user.email_trusted:
|
||||
# Matched against the stored row, in case the user changed it meanwhile.
|
||||
if not db_user_handler.trust_email(id, confirm_email):
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_409_CONFLICT,
|
||||
detail="The user's email changed. Reload it and confirm again.",
|
||||
)
|
||||
confirmed = True
|
||||
|
||||
# You can't change your own role
|
||||
if form_data.role and request.user.id != id:
|
||||
@@ -654,8 +663,8 @@ async def update_user(
|
||||
db_client_token_handler.get_token_ids_by_users([id])
|
||||
)
|
||||
|
||||
if vouch_for:
|
||||
db_user_handler.trust_email(id, vouch_for)
|
||||
if confirmed:
|
||||
cleaned_data["email_trusted"] = True
|
||||
|
||||
before = db_user
|
||||
db_user = db_user_handler.get_user(id)
|
||||
|
||||
@@ -3,6 +3,7 @@ from datetime import timedelta
|
||||
|
||||
import pytest
|
||||
from fastapi import status
|
||||
from tests.audit_events import recorded_events
|
||||
from tests.auth_helpers import bearer
|
||||
|
||||
from endpoints import user as user_endpoints
|
||||
@@ -736,50 +737,88 @@ def test_a_user_a_delegated_user_manager_creates_has_an_untrusted_email(
|
||||
assert created and not created.email_trusted
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"email", ["viewer@example.com", "new@example.com"], ids=["unchanged", "changed"]
|
||||
)
|
||||
def test_an_admin_saving_a_users_email_trusts_it(
|
||||
client, access_token: str, viewer_user: User, email: str
|
||||
def test_an_admin_setting_a_new_email_trusts_it(
|
||||
client, access_token: str, viewer_user: User
|
||||
):
|
||||
db_user_handler.update_user(viewer_user.id, {"email": "viewer@example.com"})
|
||||
|
||||
response = client.put(
|
||||
f"/api/users/{viewer_user.id}",
|
||||
data={"email": email},
|
||||
data={"email": "new@example.com"},
|
||||
headers=bearer(access_token),
|
||||
)
|
||||
|
||||
assert response.status_code == status.HTTP_200_OK
|
||||
assert response.json()["email_trusted"] is True
|
||||
|
||||
|
||||
def test_an_admin_save_that_resends_the_email_does_not_trust_it(
|
||||
client, access_token: str, viewer_user: User
|
||||
):
|
||||
db_user_handler.update_user(
|
||||
viewer_user.id, {"email": "viewer@example.com", "enabled": False}
|
||||
)
|
||||
|
||||
response = client.put(
|
||||
f"/api/users/{viewer_user.id}",
|
||||
data={"email": "viewer@example.com", "enabled": "true"},
|
||||
headers=bearer(access_token),
|
||||
)
|
||||
|
||||
assert response.status_code == status.HTTP_200_OK
|
||||
updated = db_user_handler.get_user(viewer_user.id)
|
||||
assert updated and updated.email_trusted
|
||||
assert updated and updated.enabled and not updated.email_trusted
|
||||
|
||||
|
||||
def test_an_admin_vouches_only_for_the_email_they_saved(
|
||||
client, access_token: str, viewer_user: User, mocker
|
||||
):
|
||||
def test_an_admin_confirms_a_users_email(client, access_token: str, viewer_user: User):
|
||||
db_user_handler.update_user(viewer_user.id, {"email": "viewer@example.com"})
|
||||
stale = db_user_handler.get_user(viewer_user.id)
|
||||
# The user changes their email after the admin's request has read the old one.
|
||||
db_user_handler.update_user(viewer_user.id, {"email": "taken@example.com"})
|
||||
get_user = db_user_handler.get_user
|
||||
reads = iter([stale])
|
||||
mocker.patch.object(
|
||||
db_user_handler,
|
||||
"get_user",
|
||||
side_effect=lambda id: next(reads, None) or get_user(id),
|
||||
)
|
||||
|
||||
response = client.put(
|
||||
f"/api/users/{viewer_user.id}",
|
||||
data={"email": "viewer@example.com"},
|
||||
data={"email": "viewer@example.com", "confirm_email": "Viewer@Example.com"},
|
||||
headers=bearer(access_token),
|
||||
)
|
||||
|
||||
assert response.status_code == status.HTTP_200_OK
|
||||
current = get_user(viewer_user.id)
|
||||
assert current and current.email == "taken@example.com"
|
||||
assert not current.email_trusted
|
||||
assert response.json()["email_trusted"] is True
|
||||
edit = next(e for e in recorded_events() if e.action == "user.edit")
|
||||
assert edit.data == {"changed": ["email_trusted"]}
|
||||
|
||||
|
||||
def test_a_delegated_user_manager_cannot_confirm_an_email(
|
||||
client, admin_user: User, viewer_user: User, editor_user: User
|
||||
):
|
||||
db_user_handler.update_user(editor_user.id, {"email": "editor@example.com"})
|
||||
token = _delegated_user_manager_token(viewer_user)
|
||||
|
||||
response = client.put(
|
||||
f"/api/users/{editor_user.id}",
|
||||
data={"confirm_email": "editor@example.com"},
|
||||
headers=bearer(token),
|
||||
)
|
||||
|
||||
assert response.status_code == status.HTTP_403_FORBIDDEN
|
||||
updated = db_user_handler.get_user(editor_user.id)
|
||||
assert updated and not updated.email_trusted
|
||||
|
||||
|
||||
def test_an_admin_confirms_only_the_email_they_saw(
|
||||
client, access_token: str, viewer_user: User
|
||||
):
|
||||
db_user_handler.update_user(
|
||||
viewer_user.id, {"email": "taken@example.com", "enabled": False}
|
||||
)
|
||||
|
||||
response = client.put(
|
||||
f"/api/users/{viewer_user.id}",
|
||||
data={"confirm_email": "viewer@example.com", "enabled": "true"},
|
||||
headers=bearer(access_token),
|
||||
)
|
||||
|
||||
assert response.status_code == status.HTTP_409_CONFLICT
|
||||
current = db_user_handler.get_user(viewer_user.id)
|
||||
assert current and not current.email_trusted
|
||||
assert not current.enabled
|
||||
|
||||
|
||||
def test_a_password_less_account_cannot_set_a_password_with_a_token(
|
||||
|
||||
1
frontend/src/__generated__/models/UserForm.ts
generated
1
frontend/src/__generated__/models/UserForm.ts
generated
@@ -7,6 +7,7 @@ export type UserForm = {
|
||||
password?: (string | null);
|
||||
current_password?: (string | null);
|
||||
email?: (string | null);
|
||||
confirm_email?: (string | null);
|
||||
role?: (string | null);
|
||||
enabled?: (boolean | null);
|
||||
ra_username?: (string | null);
|
||||
|
||||
1
frontend/src/__generated__/models/UserSchema.ts
generated
1
frontend/src/__generated__/models/UserSchema.ts
generated
@@ -14,6 +14,7 @@ export type UserSchema = {
|
||||
oauth_scopes: Array<string>;
|
||||
has_password: boolean;
|
||||
email_managed_by_oidc: boolean;
|
||||
email_trusted: boolean;
|
||||
avatar_path: string;
|
||||
last_login: (string | null);
|
||||
last_active: (string | null);
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { type VueWrapper, flushPromises, mount } from "@vue/test-utils";
|
||||
import mitt, { type Emitter } from "mitt";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { UserPermissionsSchema } from "@/__generated__";
|
||||
import { RTextField } from "@/lib";
|
||||
import type { UserPermissionsSchema, UserSchema } from "@/__generated__";
|
||||
import { RSwitch, RTextField } from "@/lib";
|
||||
import storeAuth from "@/stores/auth";
|
||||
import storeHeartbeat from "@/stores/heartbeat";
|
||||
import type { Events } from "@/types/emitter";
|
||||
import { userFixture } from "@/utils/user.fixtures";
|
||||
import AgeLimitFields from "./AgeLimitFields.vue";
|
||||
@@ -92,8 +93,8 @@ async function mountDialog(role: "admin" | "user" = "admin") {
|
||||
},
|
||||
},
|
||||
});
|
||||
const open = (id = 4) => {
|
||||
emitter.emit("showEditUserDialog", userFixture({ id, role }));
|
||||
const open = (id = 4, overrides: Partial<UserSchema> = {}) => {
|
||||
emitter.emit("showEditUserDialog", userFixture({ id, role, ...overrides }));
|
||||
return flushPromises();
|
||||
};
|
||||
await open();
|
||||
@@ -396,3 +397,66 @@ describe("EditUserDialog OIDC email", () => {
|
||||
expect(emailField(wrapper)?.props("readonly")).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("EditUserDialog email confirmation", () => {
|
||||
const unconfirmed = { email: "invitee@example.com", email_trusted: false };
|
||||
const confirmSwitch = (wrapper: VueWrapper) =>
|
||||
wrapper
|
||||
.findAllComponents(RSwitch)
|
||||
.find((s) => s.props("label") === "settings.confirm-email");
|
||||
|
||||
beforeEach(() => {
|
||||
const heartbeat = storeHeartbeat();
|
||||
heartbeat.value = {
|
||||
...heartbeat.value,
|
||||
OIDC: { ...heartbeat.value.OIDC, ENABLED: true },
|
||||
};
|
||||
storeAuth().setCurrentUser(userFixture({ id: 1 }));
|
||||
updateUser.mockResolvedValue({ data: userFixture({ id: 4 }) });
|
||||
});
|
||||
|
||||
async function save(wrapper: VueWrapper) {
|
||||
const apply = wrapper
|
||||
.findAll("button")
|
||||
.find((b) => b.text() === "common.apply");
|
||||
await apply?.trigger("click");
|
||||
await flushPromises();
|
||||
}
|
||||
|
||||
it("confirms the saved email only when the admin turns the switch on", async () => {
|
||||
const { wrapper, open } = await mountDialog();
|
||||
await open(4, unconfirmed);
|
||||
|
||||
await save(wrapper);
|
||||
expect(updateUser.mock.lastCall?.[0].confirm_email).toBeUndefined();
|
||||
|
||||
await open(4, unconfirmed);
|
||||
confirmSwitch(wrapper)?.vm.$emit("update:modelValue", true);
|
||||
await save(wrapper);
|
||||
expect(updateUser.mock.lastCall?.[0].confirm_email).toBe(
|
||||
"invitee@example.com",
|
||||
);
|
||||
});
|
||||
|
||||
it("hides the switch once the email is edited", async () => {
|
||||
const { wrapper, open } = await mountDialog();
|
||||
await open(4, unconfirmed);
|
||||
expect(confirmSwitch(wrapper)).toBeDefined();
|
||||
|
||||
const email = wrapper
|
||||
.findAllComponents(RTextField)
|
||||
.find((f) => f.props("type") === "email");
|
||||
email?.vm.$emit("update:modelValue", "other@example.com");
|
||||
await flushPromises();
|
||||
|
||||
expect(confirmSwitch(wrapper)).toBeUndefined();
|
||||
});
|
||||
|
||||
it("hides the switch from a delegated user manager", async () => {
|
||||
storeAuth().setCurrentUser(userFixture({ id: 1, role: "user" }));
|
||||
const { wrapper, open } = await mountDialog();
|
||||
await open(4, unconfirmed);
|
||||
|
||||
expect(confirmSwitch(wrapper)).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -17,6 +17,7 @@ import permissionsApi from "@/services/api/permissions";
|
||||
import platformApi from "@/services/api/platform";
|
||||
import userApi from "@/services/api/user";
|
||||
import storeAuth from "@/stores/auth";
|
||||
import storeHeartbeat from "@/stores/heartbeat";
|
||||
import storePermissionGroups from "@/stores/permissionGroups";
|
||||
import type { Platform } from "@/stores/platforms";
|
||||
import storeUsers from "@/stores/users";
|
||||
@@ -34,6 +35,7 @@ defineOptions({ inheritAttrs: false });
|
||||
|
||||
const { t } = useI18n();
|
||||
const auth = storeAuth();
|
||||
const heartbeat = storeHeartbeat();
|
||||
const usersStore = storeUsers();
|
||||
const groupsStore = storePermissionGroups();
|
||||
const emitter = inject<Emitter<Events>>("emitter");
|
||||
@@ -44,6 +46,8 @@ const submitting = ref(false);
|
||||
const user = ref<UserItem | null>(null);
|
||||
const confirmPassword = ref("");
|
||||
const currentPassword = ref("");
|
||||
const savedEmail = ref<string | null>(null);
|
||||
const confirmEmail = ref(false);
|
||||
const imagePreviewUrl = useObjectUrl(() => user.value?.avatar);
|
||||
const fileInputRef = ref<HTMLInputElement | null>(null);
|
||||
|
||||
@@ -101,6 +105,18 @@ const emailLocked = computed(
|
||||
() => editingSelf.value && !!auth.user?.email_managed_by_oidc,
|
||||
);
|
||||
|
||||
// A first OIDC sign-in links an account by email only once an admin confirms
|
||||
// it. A changed email is trusted on save, so the switch covers the saved one.
|
||||
const canConfirmEmail = computed(
|
||||
() =>
|
||||
heartbeat.value.OIDC.ENABLED &&
|
||||
auth.user?.role === "admin" &&
|
||||
!!user.value &&
|
||||
!user.value.email_trusted &&
|
||||
!!savedEmail.value &&
|
||||
(user.value.email ?? "").toLowerCase() === savedEmail.value.toLowerCase(),
|
||||
);
|
||||
|
||||
const requiresCurrentPassword = computed(
|
||||
() =>
|
||||
editingSelf.value &&
|
||||
@@ -134,6 +150,8 @@ async function open(toEdit: Events["showEditUserDialog"]) {
|
||||
user.value = { ...toEdit, password: "", avatar: undefined };
|
||||
confirmPassword.value = "";
|
||||
currentPassword.value = "";
|
||||
savedEmail.value = toEdit.email;
|
||||
confirmEmail.value = false;
|
||||
isAdmin.value = toEdit.role === "admin";
|
||||
showAdvanced.value = false;
|
||||
accessLoaded.value = false;
|
||||
@@ -305,6 +323,10 @@ async function save() {
|
||||
current_password: requiresCurrentPassword.value
|
||||
? currentPassword.value
|
||||
: undefined,
|
||||
confirm_email:
|
||||
confirmEmail.value && canConfirmEmail.value
|
||||
? (savedEmail.value ?? undefined)
|
||||
: undefined,
|
||||
});
|
||||
|
||||
let nextUser = data;
|
||||
@@ -422,6 +444,15 @@ function close() {
|
||||
{{ t("settings.email") }}
|
||||
</template>
|
||||
</RTextField>
|
||||
<div v-if="canConfirmEmail" class="r-user-dialog__confirm-email">
|
||||
<RSwitch
|
||||
v-model="confirmEmail"
|
||||
:label="t('settings.confirm-email')"
|
||||
/>
|
||||
<span class="r-user-dialog__hint">
|
||||
{{ t("settings.confirm-email-hint") }}
|
||||
</span>
|
||||
</div>
|
||||
<RTextField
|
||||
v-if="requiresCurrentPassword"
|
||||
v-model="currentPassword"
|
||||
@@ -665,6 +696,11 @@ html[data-bp~="xs"] .r-user-dialog__edit-grid {
|
||||
gap: 12px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.r-user-dialog__confirm-email {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
.r-user-dialog__field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
"field-custom-name": "име",
|
||||
"field-description": "описание",
|
||||
"field-email": "имейл",
|
||||
"field-email-trusted": "потвърждение на имейл",
|
||||
"field-enabled": "активиран",
|
||||
"field-fs-name": "име на файл",
|
||||
"field-is-public": "видимост",
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
"config-file-not-writable-title": "Конфигурационният файл не е записваем!",
|
||||
"config-file-parse-error-desc": "The config.yml file has a syntax error, so RomM is running with default settings and ignoring your configuration. Fix the error and restart RomM to apply your settings. Details: {error}",
|
||||
"config-file-parse-error-title": "Configuration file could not be parsed!",
|
||||
"confirm-email": "Потвърди този имейл",
|
||||
"confirm-email-hint": "Непотвърден. Първо влизане чрез доставчика на самоличност не може да свърже този акаунт, докато не потвърдите, че имейлът принадлежи на този потребител.",
|
||||
"confirm-protected-launch": "Потвърждаване при стартиране на архивирани игри",
|
||||
"confirm-protected-launch-desc": "Питане преди стартиране на игра, отбелязана като „Изоставена“ или „Неиграна никога“.",
|
||||
"controller-debug": "Диагностика на контролера",
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
"field-custom-name": "název",
|
||||
"field-description": "popis",
|
||||
"field-email": "e-mail",
|
||||
"field-email-trusted": "potvrzení e-mailu",
|
||||
"field-enabled": "povoleno",
|
||||
"field-fs-name": "název souboru",
|
||||
"field-is-public": "viditelnost",
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
"config-file-not-writable-title": "Konfigurační soubor nelze zapisovat!",
|
||||
"config-file-parse-error-desc": "The config.yml file has a syntax error, so RomM is running with default settings and ignoring your configuration. Fix the error and restart RomM to apply your settings. Details: {error}",
|
||||
"config-file-parse-error-title": "Configuration file could not be parsed!",
|
||||
"confirm-email": "Potvrdit tento e-mail",
|
||||
"confirm-email-hint": "Nepotvrzeno. První přihlášení přes poskytovatele identity nemůže propojit tento účet, dokud nepotvrdíte, že e-mail patří tomuto uživateli.",
|
||||
"confirm-protected-launch": "Potvrzovat spuštění odložených her",
|
||||
"confirm-protected-launch-desc": "Zeptat se před spuštěním hry označené jako Opuštěno nebo Nikdy nebudu hrát.",
|
||||
"controller-debug": "Ladění ovladače",
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
"field-custom-name": "Name",
|
||||
"field-description": "Beschreibung",
|
||||
"field-email": "E-Mail",
|
||||
"field-email-trusted": "E-Mail-Bestätigung",
|
||||
"field-enabled": "aktiviert",
|
||||
"field-fs-name": "Dateiname",
|
||||
"field-is-public": "Sichtbarkeit",
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
"config-file-not-writable-title": "Konfigurationsdatei nicht beschreibbar!",
|
||||
"config-file-parse-error-desc": "The config.yml file has a syntax error, so RomM is running with default settings and ignoring your configuration. Fix the error and restart RomM to apply your settings. Details: {error}",
|
||||
"config-file-parse-error-title": "Configuration file could not be parsed!",
|
||||
"confirm-email": "Diese E-Mail bestätigen",
|
||||
"confirm-email-hint": "Nicht bestätigt. Eine erste Anmeldung über den Identitätsanbieter kann dieses Konto erst verknüpfen, wenn du bestätigst, dass die E-Mail diesem Benutzer gehört.",
|
||||
"confirm-protected-launch": "Starten zurückgestellter Spiele bestätigen",
|
||||
"confirm-protected-launch-desc": "Vor dem Starten eines Spiels nachfragen, das als Aufgegeben oder Nie spielen markiert ist.",
|
||||
"controller-debug": "Controller-Debug",
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
"field-custom-name": "name",
|
||||
"field-description": "description",
|
||||
"field-email": "email",
|
||||
"field-email-trusted": "email confirmation",
|
||||
"field-enabled": "enabled",
|
||||
"field-fs-name": "file name",
|
||||
"field-is-public": "visibility",
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
"config-file-not-writable-title": "Configuration file not writable!",
|
||||
"config-file-parse-error-desc": "The config.yml file has a syntax error, so RomM is running with default settings and ignoring your configuration. Fix the error and restart RomM to apply your settings. Details: {error}",
|
||||
"config-file-parse-error-title": "Configuration file could not be parsed!",
|
||||
"confirm-email": "Confirm this email",
|
||||
"confirm-email-hint": "Unconfirmed. A first sign-in through the identity provider can't link this account until you confirm the email belongs to this user.",
|
||||
"confirm-protected-launch": "Confirm launching shelved games",
|
||||
"confirm-protected-launch-desc": "Ask before launching a game you marked as Retired or Never Playing.",
|
||||
"controller-debug": "Controller debug",
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
"field-custom-name": "name",
|
||||
"field-description": "description",
|
||||
"field-email": "email",
|
||||
"field-email-trusted": "email confirmation",
|
||||
"field-enabled": "enabled",
|
||||
"field-fs-name": "file name",
|
||||
"field-is-public": "visibility",
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
"config-file-not-writable-title": "Configuration file not writable!",
|
||||
"config-file-parse-error-desc": "The config.yml file has a syntax error, so RomM is running with default settings and ignoring your configuration. Fix the error and restart RomM to apply your settings. Details: {error}",
|
||||
"config-file-parse-error-title": "Configuration file could not be parsed!",
|
||||
"confirm-email": "Confirm this email",
|
||||
"confirm-email-hint": "Unconfirmed. A first sign-in through the identity provider can't link this account until you confirm the email belongs to this user.",
|
||||
"confirm-protected-launch": "Confirm launching shelved games",
|
||||
"confirm-protected-launch-desc": "Ask before launching a game you marked as Retired or Never Playing.",
|
||||
"controller-debug": "Controller debug",
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
"field-custom-name": "nombre",
|
||||
"field-description": "descripción",
|
||||
"field-email": "correo electrónico",
|
||||
"field-email-trusted": "confirmación del correo",
|
||||
"field-enabled": "habilitado",
|
||||
"field-fs-name": "nombre del archivo",
|
||||
"field-is-public": "visibilidad",
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
"config-file-not-writable-title": "¡Archivo de configuración no escribible!",
|
||||
"config-file-parse-error-desc": "The config.yml file has a syntax error, so RomM is running with default settings and ignoring your configuration. Fix the error and restart RomM to apply your settings. Details: {error}",
|
||||
"config-file-parse-error-title": "Configuration file could not be parsed!",
|
||||
"confirm-email": "Confirmar este correo",
|
||||
"confirm-email-hint": "Sin confirmar. Un primer inicio de sesión mediante el proveedor de identidad no puede vincular esta cuenta hasta que confirmes que el correo pertenece a este usuario.",
|
||||
"confirm-protected-launch": "Confirmar el inicio de juegos archivados",
|
||||
"confirm-protected-launch-desc": "Preguntar antes de iniciar un juego marcado como Abandonado o Nunca jugar.",
|
||||
"controller-debug": "Depuración del mando",
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
"field-custom-name": "nom",
|
||||
"field-description": "description",
|
||||
"field-email": "e-mail",
|
||||
"field-email-trusted": "confirmation de l'e-mail",
|
||||
"field-enabled": "activé",
|
||||
"field-fs-name": "nom du fichier",
|
||||
"field-is-public": "visibilité",
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
"config-file-not-writable-title": "Fichier de configuration non inscriptible !",
|
||||
"config-file-parse-error-desc": "The config.yml file has a syntax error, so RomM is running with default settings and ignoring your configuration. Fix the error and restart RomM to apply your settings. Details: {error}",
|
||||
"config-file-parse-error-title": "Configuration file could not be parsed!",
|
||||
"confirm-email": "Confirmer cet e-mail",
|
||||
"confirm-email-hint": "Non confirmé. Une première connexion via le fournisseur d'identité ne peut pas être liée à ce compte tant que vous n'avez pas confirmé que l'e-mail appartient à cet utilisateur.",
|
||||
"confirm-protected-launch": "Confirmer le lancement des jeux mis de côté",
|
||||
"confirm-protected-launch-desc": "Demander avant de lancer un jeu marqué comme Abandonné ou Jamais joué.",
|
||||
"controller-debug": "Débogage manette",
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
"field-custom-name": "név",
|
||||
"field-description": "leírás",
|
||||
"field-email": "e-mail",
|
||||
"field-email-trusted": "e-mail megerősítése",
|
||||
"field-enabled": "engedélyezve",
|
||||
"field-fs-name": "fájlnév",
|
||||
"field-is-public": "láthatóság",
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
"config-file-not-writable-title": "Konfigurációs fájl nem írható!",
|
||||
"config-file-parse-error-desc": "The config.yml file has a syntax error, so RomM is running with default settings and ignoring your configuration. Fix the error and restart RomM to apply your settings. Details: {error}",
|
||||
"config-file-parse-error-title": "Configuration file could not be parsed!",
|
||||
"confirm-email": "E-mail megerősítése",
|
||||
"confirm-email-hint": "Nincs megerősítve. Az identitásszolgáltatón keresztüli első bejelentkezés addig nem kapcsolhatja ezt a fiókot, amíg meg nem erősíted, hogy az e-mail ehhez a felhasználóhoz tartozik.",
|
||||
"confirm-protected-launch": "Félretett játékok indításának megerősítése",
|
||||
"confirm-protected-launch-desc": "Rákérdezés a Félretett vagy Soha nem játszom jelölésű játék indítása előtt.",
|
||||
"controller-debug": "Kontroller hibakeresés",
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
"field-custom-name": "nome",
|
||||
"field-description": "descrizione",
|
||||
"field-email": "email",
|
||||
"field-email-trusted": "conferma email",
|
||||
"field-enabled": "abilitato",
|
||||
"field-fs-name": "nome file",
|
||||
"field-is-public": "visibilità",
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
"config-file-not-writable-title": "File di configurazione non scrivibile!",
|
||||
"config-file-parse-error-desc": "Il file config.yml ha un errore di sintassi, quindi RomM sta ignorando la tua configurazione e sta usando le impostazioni di default. Sistema l'errore e riavvia RomM per applicare le tue impostazioni. Dettagli: {error}",
|
||||
"config-file-parse-error-title": "Non è stato possibile parsare il file di configurazione!",
|
||||
"confirm-email": "Conferma questa email",
|
||||
"confirm-email-hint": "Non confermata. Un primo accesso tramite il provider di identità non può collegare questo account finché non confermi che l'email appartiene a questo utente.",
|
||||
"confirm-protected-launch": "Conferma l'avvio dei giochi accantonati",
|
||||
"confirm-protected-launch-desc": "Chiedi conferma prima di avviare un gioco contrassegnato come Abbandonato o Mai giocare.",
|
||||
"controller-debug": "Debug controller",
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
"field-custom-name": "名前",
|
||||
"field-description": "説明",
|
||||
"field-email": "メール",
|
||||
"field-email-trusted": "メールの確認",
|
||||
"field-enabled": "有効",
|
||||
"field-fs-name": "ファイル名",
|
||||
"field-is-public": "公開設定",
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
"config-file-not-writable-title": "設定ファイルが書き込み不可です!",
|
||||
"config-file-parse-error-desc": "The config.yml file has a syntax error, so RomM is running with default settings and ignoring your configuration. Fix the error and restart RomM to apply your settings. Details: {error}",
|
||||
"config-file-parse-error-title": "Configuration file could not be parsed!",
|
||||
"confirm-email": "このメールを確認済みにする",
|
||||
"confirm-email-hint": "未確認です。メールがこのユーザーのものであると確認するまで、IDプロバイダー経由の初回サインインはこのアカウントにリンクできません。",
|
||||
"confirm-protected-launch": "棚上げしたゲームの起動を確認する",
|
||||
"confirm-protected-launch-desc": "「中断」または「プレイしない」に設定したゲームを起動する前に確認します。",
|
||||
"controller-debug": "コントローラーデバッグ",
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
"field-custom-name": "이름",
|
||||
"field-description": "설명",
|
||||
"field-email": "이메일",
|
||||
"field-email-trusted": "이메일 확인",
|
||||
"field-enabled": "활성화됨",
|
||||
"field-fs-name": "파일 이름",
|
||||
"field-is-public": "공개 여부",
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
"config-file-not-writable-title": "구성 파일을 쓸 수 없음!",
|
||||
"config-file-parse-error-desc": "The config.yml file has a syntax error, so RomM is running with default settings and ignoring your configuration. Fix the error and restart RomM to apply your settings. Details: {error}",
|
||||
"config-file-parse-error-title": "Configuration file could not be parsed!",
|
||||
"confirm-email": "이 이메일 확인",
|
||||
"confirm-email-hint": "확인되지 않았습니다. 이메일이 이 사용자의 것임을 확인하기 전까지는 ID 공급자를 통한 첫 로그인이 이 계정에 연결될 수 없습니다.",
|
||||
"confirm-protected-launch": "보류한 게임 실행 확인",
|
||||
"confirm-protected-launch-desc": "중단 또는 플레이 안 함으로 표시한 게임을 실행하기 전에 확인합니다.",
|
||||
"controller-debug": "컨트롤러 디버그",
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
"field-custom-name": "nazwa",
|
||||
"field-description": "opis",
|
||||
"field-email": "e-mail",
|
||||
"field-email-trusted": "potwierdzenie e-maila",
|
||||
"field-enabled": "włączone",
|
||||
"field-fs-name": "nazwa pliku",
|
||||
"field-is-public": "widoczność",
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
"config-file-not-writable-title": "Plik konfiguracyjny nie do zapisu!",
|
||||
"config-file-parse-error-desc": "The config.yml file has a syntax error, so RomM is running with default settings and ignoring your configuration. Fix the error and restart RomM to apply your settings. Details: {error}",
|
||||
"config-file-parse-error-title": "Configuration file could not be parsed!",
|
||||
"confirm-email": "Potwierdź ten e-mail",
|
||||
"confirm-email-hint": "Niepotwierdzony. Pierwsze logowanie przez dostawcę tożsamości nie połączy tego konta, dopóki nie potwierdzisz, że e-mail należy do tego użytkownika.",
|
||||
"confirm-protected-launch": "Potwierdzaj uruchamianie odłożonych gier",
|
||||
"confirm-protected-launch-desc": "Pytaj przed uruchomieniem gry oznaczonej jako Porzucone lub Nigdy nie gram.",
|
||||
"controller-debug": "Debugowanie kontrolera",
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
"field-custom-name": "nome",
|
||||
"field-description": "descrição",
|
||||
"field-email": "e-mail",
|
||||
"field-email-trusted": "confirmação do e-mail",
|
||||
"field-enabled": "habilitado",
|
||||
"field-fs-name": "nome do arquivo",
|
||||
"field-is-public": "visibilidade",
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
"config-file-not-writable-title": "Arquivo de configuração não gravável!",
|
||||
"config-file-parse-error-desc": "O arquivo config.yml contém um erro de sintaxe, então o RomM está sendo executado com as configurações padrão e ignorando a sua configuração. Corrija o erro e reinicie o RomM para aplicar suas configurações. Detalhes: {error}",
|
||||
"config-file-parse-error-title": "Não foi possível interpretar o arquivo de configuração!",
|
||||
"confirm-email": "Confirmar este e-mail",
|
||||
"confirm-email-hint": "Não confirmado. Um primeiro login pelo provedor de identidade não pode vincular esta conta até você confirmar que o e-mail pertence a este usuário.",
|
||||
"confirm-protected-launch": "Confirmar a inicialização de jogos arquivados",
|
||||
"confirm-protected-launch-desc": "Perguntar antes de iniciar um jogo marcado como Abandonado ou Nunca jogar.",
|
||||
"controller-debug": "Depuração do controle",
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
"field-custom-name": "nume",
|
||||
"field-description": "descriere",
|
||||
"field-email": "email",
|
||||
"field-email-trusted": "confirmarea e-mailului",
|
||||
"field-enabled": "activat",
|
||||
"field-fs-name": "nume fișier",
|
||||
"field-is-public": "vizibilitate",
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
"config-file-not-writable-title": "Fișierul de configurare nu este inscriptibil!",
|
||||
"config-file-parse-error-desc": "The config.yml file has a syntax error, so RomM is running with default settings and ignoring your configuration. Fix the error and restart RomM to apply your settings. Details: {error}",
|
||||
"config-file-parse-error-title": "Configuration file could not be parsed!",
|
||||
"confirm-email": "Confirmă acest e-mail",
|
||||
"confirm-email-hint": "Neconfirmat. O primă autentificare prin furnizorul de identitate nu poate lega acest cont până nu confirmi că e-mailul aparține acestui utilizator.",
|
||||
"confirm-protected-launch": "Confirmă pornirea jocurilor puse deoparte",
|
||||
"confirm-protected-launch-desc": "Întreabă înainte de a porni un joc marcat ca Abandonat sau Nu voi juca niciodată.",
|
||||
"controller-debug": "Depanare controller",
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
"field-custom-name": "название",
|
||||
"field-description": "описание",
|
||||
"field-email": "электронная почта",
|
||||
"field-email-trusted": "подтверждение email",
|
||||
"field-enabled": "включён",
|
||||
"field-fs-name": "имя файла",
|
||||
"field-is-public": "видимость",
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
"config-file-not-writable-title": "Файл конфигурации не записываемый!",
|
||||
"config-file-parse-error-desc": "The config.yml file has a syntax error, so RomM is running with default settings and ignoring your configuration. Fix the error and restart RomM to apply your settings. Details: {error}",
|
||||
"config-file-parse-error-title": "Configuration file could not be parsed!",
|
||||
"confirm-email": "Подтвердить этот email",
|
||||
"confirm-email-hint": "Не подтверждён. Первый вход через провайдера удостоверений не сможет привязать эту учётную запись, пока вы не подтвердите, что email принадлежит этому пользователю.",
|
||||
"confirm-protected-launch": "Подтверждать запуск отложенных игр",
|
||||
"confirm-protected-launch-desc": "Спрашивать перед запуском игры, отмеченной как «Заброшено» или «Никогда не играть».",
|
||||
"controller-debug": "Отладка контроллера",
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
"field-custom-name": "namn",
|
||||
"field-description": "beskrivning",
|
||||
"field-email": "e-post",
|
||||
"field-email-trusted": "e-postbekräftelse",
|
||||
"field-enabled": "aktiverad",
|
||||
"field-fs-name": "filnamn",
|
||||
"field-is-public": "synlighet",
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
"config-file-not-writable-title": "Konfigurationsfilen är inte skrivbar.",
|
||||
"config-file-parse-error-desc": "Filen config.yml innehåller ett syntaxfel. RomM kör därför med standardinställningar och ignorerar din konfiguration. Rätta felet och starta om RomM för att använda dina inställningar. Information: {error}",
|
||||
"config-file-parse-error-title": "Kunde inte tolka konfigurationsfilen.",
|
||||
"confirm-email": "Bekräfta den här e-postadressen",
|
||||
"confirm-email-hint": "Inte bekräftad. En första inloggning via identitetsleverantören kan inte länka det här kontot förrän du bekräftar att e-postadressen tillhör den här användaren.",
|
||||
"confirm-protected-launch": "Bekräfta start av undanstoppade spel",
|
||||
"confirm-protected-launch-desc": "Fråga innan ett spel startas som du har markerat som Avslutad eller Spelar aldrig.",
|
||||
"controller-debug": "Felsökning av handkontroll",
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
"field-custom-name": "ad",
|
||||
"field-description": "açıklama",
|
||||
"field-email": "e-posta",
|
||||
"field-email-trusted": "e-posta onayı",
|
||||
"field-enabled": "etkin",
|
||||
"field-fs-name": "dosya adı",
|
||||
"field-is-public": "görünürlük",
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
"config-file-not-writable-title": "Yapılandırma dosyası yazılabilir değil!",
|
||||
"config-file-parse-error-desc": "The config.yml file has a syntax error, so RomM is running with default settings and ignoring your configuration. Fix the error and restart RomM to apply your settings. Details: {error}",
|
||||
"config-file-parse-error-title": "Configuration file could not be parsed!",
|
||||
"confirm-email": "Bu e-postayı onayla",
|
||||
"confirm-email-hint": "Onaylanmadı. Kimlik sağlayıcı üzerinden ilk giriş, e-postanın bu kullanıcıya ait olduğunu onaylayana kadar bu hesaba bağlanamaz.",
|
||||
"confirm-protected-launch": "Ertelenen oyunların başlatılmasını onayla",
|
||||
"confirm-protected-launch-desc": "Bırakıldı veya Hiç Oynanmayacak olarak işaretlediğiniz bir oyunu başlatmadan önce sorun.",
|
||||
"controller-debug": "Oyun kumandası hata ayıklama",
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
"field-custom-name": "名称",
|
||||
"field-description": "描述",
|
||||
"field-email": "电子邮件",
|
||||
"field-email-trusted": "邮箱确认",
|
||||
"field-enabled": "已启用",
|
||||
"field-fs-name": "文件名称",
|
||||
"field-is-public": "可见性",
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
"config-file-not-writable-title": "配置文件不可写!",
|
||||
"config-file-parse-error-desc": "config.yml 文件存在语法错误,因此 RomM 正在使用默认设置运行并忽略您的配置。请修正该错误并重启 RomM 以应用您的设置。详情:{error}",
|
||||
"config-file-parse-error-title": "无法解析配置文件!",
|
||||
"confirm-email": "确认此邮箱",
|
||||
"confirm-email-hint": "未确认。在你确认该邮箱属于此用户之前,通过身份提供商的首次登录无法关联此账户。",
|
||||
"confirm-protected-launch": "确认启动已搁置的游戏",
|
||||
"confirm-protected-launch-desc": "在启动标记为“已搁置”或“不玩”的游戏前进行确认。",
|
||||
"controller-debug": "手柄调试",
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
"field-custom-name": "名稱",
|
||||
"field-description": "描述",
|
||||
"field-email": "電子郵件",
|
||||
"field-email-trusted": "電子郵件確認",
|
||||
"field-enabled": "已啟用",
|
||||
"field-fs-name": "檔案名稱",
|
||||
"field-is-public": "可見性",
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
"config-file-not-writable-title": "組態檔案不可寫!",
|
||||
"config-file-parse-error-desc": "The config.yml file has a syntax error, so RomM is running with default settings and ignoring your configuration. Fix the error and restart RomM to apply your settings. Details: {error}",
|
||||
"config-file-parse-error-title": "Configuration file could not be parsed!",
|
||||
"confirm-email": "確認此電子郵件",
|
||||
"confirm-email-hint": "未確認。在你確認此電子郵件屬於該使用者之前,透過身分提供者的首次登入無法連結此帳戶。",
|
||||
"confirm-protected-launch": "確認啟動已擱置的遊戲",
|
||||
"confirm-protected-launch-desc": "在啟動標記為「已擱置」或「不玩」的遊戲前進行確認。",
|
||||
"controller-debug": "控制器除錯",
|
||||
|
||||
@@ -68,6 +68,7 @@ async function updateUser({
|
||||
avatar?: File;
|
||||
password?: string;
|
||||
current_password?: string | undefined;
|
||||
confirm_email?: string | undefined;
|
||||
}) {
|
||||
return api.put<UserSchema>(
|
||||
`/users/${id}`,
|
||||
@@ -77,6 +78,7 @@ async function updateUser({
|
||||
password: attrs.password,
|
||||
current_password: attrs.current_password,
|
||||
email: attrs.email,
|
||||
confirm_email: attrs.confirm_email,
|
||||
enabled: attrs.enabled,
|
||||
role: attrs.role,
|
||||
ra_username: attrs.ra_username,
|
||||
|
||||
@@ -12,6 +12,7 @@ export function userFixture(overrides: Partial<UserSchema> = {}): UserSchema {
|
||||
oauth_scopes: [],
|
||||
has_password: true,
|
||||
email_managed_by_oidc: false,
|
||||
email_trusted: true,
|
||||
avatar_path: "",
|
||||
last_login: null,
|
||||
last_active: null,
|
||||
|
||||
Reference in New Issue
Block a user