diff --git a/webapp/packages/core-administration/src/AdministrationScreen/ConfigurationWizard/Pages/ServerConfiguration/ServerConfigurationForm.tsx b/webapp/packages/core-administration/src/AdministrationScreen/ConfigurationWizard/Pages/ServerConfiguration/ServerConfigurationForm.tsx index d39f7d5086..520346ea78 100644 --- a/webapp/packages/core-administration/src/AdministrationScreen/ConfigurationWizard/Pages/ServerConfiguration/ServerConfigurationForm.tsx +++ b/webapp/packages/core-administration/src/AdministrationScreen/ConfigurationWizard/Pages/ServerConfiguration/ServerConfigurationForm.tsx @@ -103,6 +103,7 @@ export const ServerConfigurationForm = observer(function ServerConfigurationForm type="password" name="adminPassword" state={serverConfig} + autoComplete='new-password' mod='surface' required long diff --git a/webapp/packages/core-blocks/src/ObjectPropertyInfoForm/ObjectPropertyInfoForm.tsx b/webapp/packages/core-blocks/src/ObjectPropertyInfoForm/ObjectPropertyInfoForm.tsx index 5958a3e398..a1cec901d9 100644 --- a/webapp/packages/core-blocks/src/ObjectPropertyInfoForm/ObjectPropertyInfoForm.tsx +++ b/webapp/packages/core-blocks/src/ObjectPropertyInfoForm/ObjectPropertyInfoForm.tsx @@ -18,13 +18,15 @@ import { formStyles } from './formStyles'; type Props = { properties: ObjectPropertyInfo[] | undefined; - credentials: any; + credentials: Record; processing: boolean; prefix?: string; autofillToken?: string; className?: string; } +const RESERVED_KEYWORDS = ['no', 'off', 'new-password']; + export const ObjectPropertyInfoForm = observer(function ObjectPropertyInfoForm({ properties, credentials, @@ -51,7 +53,7 @@ export const ObjectPropertyInfoForm = observer(function ObjectPropertyInfoForm({ value={credentials[property.id!]} onChange={value => handleChange(property.id!, value)} disabled={processing} - autoComplete={autofillToken === 'off' ? 'off' : `${autofillToken} ${property.id}`} + autoComplete={RESERVED_KEYWORDS.includes(autofillToken) ? autofillToken : `${autofillToken} ${property.id}`} mod='surface' > {property.displayName} diff --git a/webapp/packages/core-blocks/src/PropertiesTable/PropertiesTable.tsx b/webapp/packages/core-blocks/src/PropertiesTable/PropertiesTable.tsx index 033ef4a1c5..331afe8f13 100644 --- a/webapp/packages/core-blocks/src/PropertiesTable/PropertiesTable.tsx +++ b/webapp/packages/core-blocks/src/PropertiesTable/PropertiesTable.tsx @@ -18,9 +18,7 @@ import { IProperty } from './IProperty'; import { PropertyItem } from './PropertyItem'; import { PROPERTIES_TABLE_STYLES } from './styles'; -type PropertiesState = { - [key: string]: string; -} +type PropertiesState = Record type PropertiesTableProps = { properties: IProperty[]; diff --git a/webapp/packages/plugin-authentication/src/Administration/Users/UserForm/UserForm.tsx b/webapp/packages/plugin-authentication/src/Administration/Users/UserForm/UserForm.tsx index 367c671b9e..9c5861ee45 100644 --- a/webapp/packages/plugin-authentication/src/Administration/Users/UserForm/UserForm.tsx +++ b/webapp/packages/plugin-authentication/src/Administration/Users/UserForm/UserForm.tsx @@ -210,10 +210,12 @@ export const UserForm = observer(function UserForm({ {translate('authentication_user_password')} @@ -226,6 +228,7 @@ export const UserForm = observer(function UserForm({ onChange={handlePasswordRepeatChange} disabled={controller.isSaving} mod='surface' + required > {translate('authentication_user_password_repeat')} diff --git a/webapp/packages/plugin-authentication/src/Administration/Users/UserForm/UserFormController.ts b/webapp/packages/plugin-authentication/src/Administration/Users/UserForm/UserFormController.ts index a4da88b832..feba6eb8b2 100644 --- a/webapp/packages/plugin-authentication/src/Administration/Users/UserForm/UserFormController.ts +++ b/webapp/packages/plugin-authentication/src/Administration/Users/UserForm/UserFormController.ts @@ -180,10 +180,8 @@ export class UserFormController implements IInitializableController, IDestructib } private isRoleSelected() { - const rolesState = Array.from(this.credentials.roles.values()) - .filter(Boolean); - - return rolesState.length > 0; + return Array.from(this.credentials.roles.values()) + .some(Boolean); } private async updateRoles() {