Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions web/package/agama-web-ui.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Feb 11 16:00:34 UTC 2026 - David Diaz <dgonzalez@suse.com>

- Do not show warnings about password strength
(gh#agama-project/agama#3156).

-------------------------------------------------------------------
Wed Feb 11 13:35:13 UTC 2026 - Ladislav Slezák <lslezak@suse.com>

Expand Down
4 changes: 1 addition & 3 deletions web/src/components/storage/EncryptionSection.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) [2024-2025] SUSE LLC
* Copyright (c) [2024-2026] SUSE LLC
*
* All Rights Reserved.
*
Expand Down Expand Up @@ -31,8 +31,6 @@ jest.mock("~/hooks/model/storage/config-model", () => ({
useConfigModel: () => mockUseConfigModel(),
}));

jest.mock("~/components/users/PasswordCheck", () => () => <div>PasswordCheck Mock</div>);

describe("EncryptionSection", () => {
describe("if encryption is enabled", () => {
beforeEach(() => {
Expand Down
5 changes: 1 addition & 4 deletions web/src/components/storage/EncryptionSection.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) [2024-2025] SUSE LLC
* Copyright (c) [2024-2026] SUSE LLC
*
* All Rights Reserved.
*
Expand Down Expand Up @@ -28,7 +28,6 @@ import Icon from "~/components/layout/Icon";
import { useConfigModel } from "~/hooks/model/storage/config-model";
import { STORAGE } from "~/routes/paths";
import { _ } from "~/i18n";
import PasswordCheck from "~/components/users/PasswordCheck";
import type { ConfigModel } from "~/model/storage/config-model";

function encryptionLabel(method?: ConfigModel.EncryptionMethod) {
Expand All @@ -42,7 +41,6 @@ export default function EncryptionSection() {
const configModel = useConfigModel();
const encryption = configModel?.encryption;
const method = encryption?.method;
const password = encryption?.password;

return (
<Stack hasGutter>
Expand All @@ -53,7 +51,6 @@ export default function EncryptionSection() {
)}
</div>
<Content isEditorial>{encryptionLabel(method)}</Content>
{password && <PasswordCheck password={password} />}
<Split hasGutter>
<Link to={STORAGE.editEncryption} keepQuery variant="plain">
<Flex alignItems={{ default: "alignItemsCenter" }} gap={{ default: "gapSm" }}>
Expand Down
2 changes: 0 additions & 2 deletions web/src/components/storage/EncryptionSettingsPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ import { installerRender } from "~/test-utils";
import EncryptionSettingsPage from "./EncryptionSettingsPage";
import type { ConfigModel } from "~/model/storage/config-model";

jest.mock("~/components/users/PasswordCheck", () => () => <div>PasswordCheck Mock</div>);

const mockLuks2Config: ConfigModel.Config = {
encryption: {
method: "luks2",
Expand Down
2 changes: 0 additions & 2 deletions web/src/components/storage/EncryptionSettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import React, { useEffect, useState, useRef } from "react";
import { useLocation, useNavigate } from "react-router";
import { ActionGroup, Alert, Checkbox, Form } from "@patternfly/react-core";
import { NestedContent, Page, PasswordAndConfirmationInput } from "~/components/core";
import PasswordCheck from "~/components/users/PasswordCheck";
import { useEncryptionMethods } from "~/hooks/model/system/storage";
import { useConfigModel, useSetEncryption } from "~/hooks/model/storage/config-model";
import { isEmpty } from "radashi";
Expand Down Expand Up @@ -137,7 +136,6 @@ at the new file systems, including data, programs, and system files.",
isDisabled={!isEnabled}
showErrors={false}
/>
<PasswordCheck password={password} />
{isTpmAvailable && (
<Checkbox
id="tpmEncryptionMethod"
Expand Down
4 changes: 1 addition & 3 deletions web/src/components/users/FirstUser.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) [2022-2025] SUSE LLC
* Copyright (c) [2022-2026] SUSE LLC
*
* All Rights Reserved.
*
Expand Down Expand Up @@ -32,7 +32,6 @@ import {
Stack,
} from "@patternfly/react-core";
import { Link, Page, SplitButton } from "~/components/core";
import PasswordCheck from "~/components/users/PasswordCheck";
// This should be based on the config, not on the proposal. As a temporary hack (introduced in a
// separate commit that should be easy to revert), we are using the proposal because the config
// does not emit an event on every change.
Expand Down Expand Up @@ -95,7 +94,6 @@ const UserData = () => {
</DescriptionListDescription>
</DescriptionListGroup>
</DescriptionList>
<PasswordCheck password={user.password} />
</Stack>
</CardBody>
</Card>
Expand Down
2 changes: 0 additions & 2 deletions web/src/components/users/FirstUserForm.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ let mockPassword: string;
let mockHashedPassword: boolean;
const mockPatchConfig = jest.fn().mockResolvedValue(true);

jest.mock("~/components/users/PasswordCheck", () => () => <div>PasswordCheck Mock</div>);

jest.mock("~/hooks/model/config", () => ({
...jest.requireActual("~/hooks/model/config"),
useConfig: () => ({
Expand Down
2 changes: 0 additions & 2 deletions web/src/components/users/FirstUserForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import {
} from "@patternfly/react-core";
import { useNavigate } from "react-router";
import { PasswordAndConfirmationInput, Page } from "~/components/core";
import PasswordCheck from "~/components/users/PasswordCheck";
import { suggestUsernames } from "~/components/users/utils";
import { useConfig } from "~/hooks/model/config";
import { patchConfig } from "~/api";
Expand Down Expand Up @@ -242,7 +241,6 @@ export default function FirstUserForm() {
showErrors={false}
onChange={(_, value) => setPassword(value)}
/>
<PasswordCheck password={password} />
</>
)}
<ActionGroup>
Expand Down
79 changes: 0 additions & 79 deletions web/src/components/users/PasswordCheck.test.tsx

This file was deleted.

56 changes: 0 additions & 56 deletions web/src/components/users/PasswordCheck.tsx

This file was deleted.

4 changes: 1 addition & 3 deletions web/src/components/users/RootUser.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) [2023-2025] SUSE LLC
* Copyright (c) [2023-2026] SUSE LLC
*
* All Rights Reserved.
*
Expand Down Expand Up @@ -32,7 +32,6 @@ import {
Stack,
} from "@patternfly/react-core";
import { Link, Page } from "~/components/core";
import PasswordCheck from "~/components/users/PasswordCheck";
import { useConfig } from "~/hooks/model/config";
import { USER } from "~/routes/paths";
import { isEmpty } from "radashi";
Expand Down Expand Up @@ -73,7 +72,6 @@ export default function RootUser() {
</DescriptionListDescription>
</DescriptionListGroup>
</DescriptionList>
{password && <PasswordCheck password={password} />}
</Stack>
</CardBody>
</Card>
Expand Down
2 changes: 0 additions & 2 deletions web/src/components/users/RootUserForm.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ let mockPublicKey: string;
let mockHashedPassword: boolean;
const mockPatchConfig = jest.fn().mockResolvedValue(true);

jest.mock("~/components/users/PasswordCheck", () => () => <div>PasswordCheck Mock</div>);

jest.mock("~/hooks/model/config", () => ({
...jest.requireActual("~/hooks/model/config"),
useConfig: () => ({
Expand Down
2 changes: 0 additions & 2 deletions web/src/components/users/RootUserForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import { patchConfig } from "~/api";
import type { Root } from "~/model/config";
import { isEmpty } from "radashi";
import { _ } from "~/i18n";
import PasswordCheck from "~/components/users/PasswordCheck";
import { USER } from "~/routes/paths";

const AVAILABLE_METHODS = ["password", "sshPublicKey"] as const;
Expand Down Expand Up @@ -169,7 +168,6 @@ const RootUserForm = () => {
onChange={onPasswordChange}
showErrors={false}
/>
<PasswordCheck password={password} />
</>
)}
</NestedContent>
Expand Down
21 changes: 4 additions & 17 deletions web/src/model/users.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) [2024] SUSE LLC
* Copyright (c) [2024-2026] SUSE LLC
*
* All Rights Reserved.
*
Expand All @@ -22,9 +22,8 @@

// @todo Move to the new API.

import { AxiosResponse } from "axios";
import { del, get, patch, post, put } from "~/http";
import { FirstUser, PasswordCheckResult, RootUser } from "~/types/users";
import { del, get, patch, put } from "~/http";
import { FirstUser, RootUser } from "~/types/users";

/**
* Returns the first user's definition
Expand Down Expand Up @@ -55,16 +54,4 @@ const fetchRoot = (): Promise<RootUser> => get("/api/users/root");
*/
const updateRoot = (changes: Partial<RootUser>) => patch("/api/users/root", changes);

/**
* Checks the strength of the given password.
*
* @param password - Password to check.
*/
const checkPassword = async (password: string): Promise<PasswordCheckResult> => {
const response: AxiosResponse<PasswordCheckResult> = await post("/api/users/password_check", {
password,
});
return response.data;
};

export { fetchFirstUser, updateFirstUser, removeFirstUser, fetchRoot, updateRoot, checkPassword };
export { fetchFirstUser, updateFirstUser, removeFirstUser, fetchRoot, updateRoot };
11 changes: 2 additions & 9 deletions web/src/types/users.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) [2024] SUSE LLC
* Copyright (c) [2024-2026] SUSE LLC
*
* All Rights Reserved.
*
Expand All @@ -20,8 +20,6 @@
* find current contact information at www.suse.com.
*/

import { TranslatedString } from "~/i18n";

type FirstUser = {
fullName: string;
userName: string;
Expand All @@ -35,9 +33,4 @@ type RootUser = {
sshPublicKey: string;
};

type PasswordCheckResult = {
success?: number;
failure?: TranslatedString;
};

export type { FirstUser, RootUser, PasswordCheckResult };
export type { FirstUser, RootUser };
Loading