Revert "wizard: add confirm password to users step (HMS-4903)"

This reverts commit ba70753a80.
This commit is contained in:
Michal Gold 2025-01-08 16:42:56 +02:00 committed by Lucas Garfield
parent d3e76c6d49
commit b3a8597b66
2 changed files with 0 additions and 43 deletions

View file

@ -6,11 +6,9 @@ import { ExternalLinkAltIcon } from '@patternfly/react-icons';
import { GENERATING_SSH_KEY_PAIRS_URL } from '../../../../../constants';
import { useAppDispatch, useAppSelector } from '../../../../../store/hooks';
import {
selectUserConfirmPassword,
selectUserNameByIndex,
selectUserPasswordByIndex,
selectUserSshKeyByIndex,
setUserConfirmPasswordByIndex,
setUserNameByIndex,
setUserPasswordByIndex,
setUserSshKeyByIndex,
@ -23,8 +21,6 @@ const UserInfo = () => {
const userName = useAppSelector(userNameSelector);
const userPasswordSelector = selectUserPasswordByIndex(index);
const userPassword = useAppSelector(userPasswordSelector);
const userConfirmPasswordSelector = selectUserConfirmPassword(index);
const userConfirmPassword = useAppSelector(userConfirmPasswordSelector);
const userSshKeySelector = selectUserSshKeyByIndex(index);
const userSshKey = useAppSelector(userSshKeySelector);
@ -42,15 +38,6 @@ const UserInfo = () => {
dispatch(setUserPasswordByIndex({ index: index, password: value }));
};
const handleConfirmPasswordChange = (
_event: React.FormEvent<HTMLInputElement>,
value: string
) => {
dispatch(
setUserConfirmPasswordByIndex({ index: index, confirmPassword: value })
);
};
const handleSshKeyChange = (
_event: React.FormEvent<HTMLInputElement>,
value: string
@ -85,16 +72,6 @@ const UserInfo = () => {
fieldName="userPassword"
/>
</FormGroup>
<FormGroup isRequired label="Confirm Password">
<HookValidatedInput
ariaLabel="blueprint user confirm password"
value={userConfirmPassword || ''}
onChange={(_e, value) => handleConfirmPasswordChange(_e, value)}
placeholder="Confirm Password"
stepValidation={stepValidation}
fieldName="userConfirmPassword"
/>
</FormGroup>
<FormGroup isRequired label="SSH key">
<HookValidatedInput
ariaLabel="public SSH key"

View file

@ -46,8 +46,6 @@ export type ComplianceType = 'openscap' | 'compliance';
export type UserWithAdditionalInfo = {
[K in keyof User]-?: NonNullable<User[K]>;
} & {
confirmPassword: string;
};
type UserPayload = {
@ -65,11 +63,6 @@ type UserSshKeyPayload = {
sshKey: string;
};
type UserConfirmPasswordPayload = {
index: number;
confirmPassword: string;
};
export type wizardState = {
env: {
serverUrl: string;
@ -380,11 +373,6 @@ export const selectUserPasswordByIndex =
return state.wizard.users[userIndex]?.password;
};
export const selectUserConfirmPassword =
(userIndex: number) => (state: RootState) => {
return state.wizard.users[userIndex]?.confirmPassword;
};
export const selectUserSshKeyByIndex =
(userIndex: number) => (state: RootState) => {
return state.wizard.users[userIndex]?.ssh_key;
@ -847,13 +835,6 @@ export const wizardSlice = createSlice({
) => {
state.users[action.payload.index].password = action.payload.password;
},
setUserConfirmPasswordByIndex: (
state,
action: PayloadAction<UserConfirmPasswordPayload>
) => {
state.users[action.payload.index].confirmPassword =
action.payload.confirmPassword;
},
setUserSshKeyByIndex: (state, action: PayloadAction<UserSshKeyPayload>) => {
state.users[action.payload.index].ssh_key = action.payload.sshKey;
},
@ -929,6 +910,5 @@ export const {
setUserNameByIndex,
setUserPasswordByIndex,
setUserSshKeyByIndex,
setUserConfirmPasswordByIndex,
} = wizardSlice.actions;
export default wizardSlice.reducer;