Skip to content

Commit

Permalink
webui: FIXME do not require user temporarily
Browse files Browse the repository at this point in the history
So that the current tests can run without big changes (we are adding
step with mandatory user interaction).
  • Loading branch information
rvykydal committed Oct 31, 2023
1 parent af0cddc commit 5041b58
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ui/webui/src/components/users/Accounts.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ export function getAccountsState (
}

export const accountsToDbusUsers = (accounts) => {
if (!accounts.userAccount) {
return [];
}
return [{
name: cockpit.variant("s", accounts.userAccount || ""),
gecos: cockpit.variant("s", accounts.fullName || ""),
Expand All @@ -68,7 +71,8 @@ const CreateAccount = ({
const [isPasswordValid, setIsPasswordValid] = useState(false);

useEffect(() => {
setIsUserValid(isPasswordValid && userAccount.length > 0);
// FIXME having no user (missing username) is allowed temporarily (WIP)
setIsUserValid((isPasswordValid && userAccount.length > 0) || !userAccount);
}, [setIsUserValid, isPasswordValid, userAccount]);

const passphraseForm = (
Expand Down

0 comments on commit 5041b58

Please sign in to comment.