passbolt-styleguide 3.8.3 → 3.9.0-alpha1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/css/help.min.css +3 -3
- package/build/css/public.min.css +3 -3
- package/build/css/themes/default/api_authentication.min.css +3 -3
- package/build/css/themes/default/api_cloud.min.css +3 -3
- package/build/css/themes/default/api_main.min.css +3 -3
- package/build/css/themes/default/api_reports.min.css +3 -3
- package/build/css/themes/default/api_webinstaller.min.css +3 -3
- package/build/css/themes/default/ext_app.min.css +3 -3
- package/build/css/themes/default/ext_authentication.min.css +3 -3
- package/build/css/themes/default/ext_external.min.css +2 -2
- package/build/css/themes/default/ext_in_form_cta.min.css +3 -3
- package/build/css/themes/default/ext_in_form_menu.min.css +3 -3
- package/build/css/themes/default/ext_quickaccess.min.css +3 -3
- package/build/css/themes/midgar/api_authentication.min.css +3 -3
- package/build/css/themes/midgar/api_main.min.css +3 -3
- package/build/css/themes/midgar/api_reports.min.css +3 -3
- package/build/css/themes/midgar/ext_app.min.css +3 -3
- package/build/css/themes/midgar/ext_authentication.min.css +3 -3
- package/build/css/themes/midgar/ext_in_form_cta.min.css +3 -3
- package/build/css/themes/midgar/ext_in_form_menu.min.css +3 -3
- package/build/css/themes/midgar/ext_quickaccess.min.css +3 -3
- package/build/css/themes/solarized_dark/api_authentication.min.css +1 -1
- package/build/css/themes/solarized_dark/api_main.min.css +1 -1
- package/build/css/themes/solarized_dark/api_reports.min.css +1 -1
- package/build/css/themes/solarized_dark/ext_app.min.css +1 -1
- package/build/css/themes/solarized_dark/ext_authentication.min.css +1 -1
- package/build/css/themes/solarized_dark/ext_in_form_cta.min.css +1 -1
- package/build/css/themes/solarized_dark/ext_in_form_menu.min.css +1 -1
- package/build/css/themes/solarized_dark/ext_quickaccess.min.css +1 -1
- package/build/css/themes/solarized_light/api_authentication.min.css +1 -1
- package/build/css/themes/solarized_light/api_main.min.css +1 -1
- package/build/css/themes/solarized_light/api_reports.min.css +1 -1
- package/build/css/themes/solarized_light/ext_app.min.css +1 -1
- package/build/css/themes/solarized_light/ext_authentication.min.css +1 -1
- package/build/css/themes/solarized_light/ext_in_form_cta.min.css +1 -1
- package/build/css/themes/solarized_light/ext_in_form_menu.min.css +1 -1
- package/build/css/themes/solarized_light/ext_quickaccess.min.css +1 -1
- package/build/js/dist/api-app.js +1 -1
- package/build/js/dist/api-app.js.LICENSE.txt +75 -5
- package/build/js/dist/api-feedback.js +2 -0
- package/build/js/dist/api-feedback.js.LICENSE.txt +45 -0
- package/build/js/dist/api-vendors.js +1 -1
- package/build/js/dist/api-vendors.js.LICENSE.txt +11 -9
- package/build/js/dist/src/locales/de-DE/common.json +995 -0
- package/build/js/dist/src/locales/en-UK/common.json +1061 -0
- package/build/js/dist/src/locales/es-ES/common.json +995 -0
- package/build/js/dist/src/locales/fr-FR/common.json +995 -0
- package/build/js/dist/src/locales/ja-JP/common.json +980 -0
- package/build/js/dist/src/locales/lt-LT/common.json +1025 -0
- package/build/js/dist/src/locales/nl-NL/common.json +995 -0
- package/build/js/dist/src/locales/pl-PL/common.json +1025 -0
- package/build/js/dist/src/locales/sv-SE/common.json +995 -0
- package/package.json +18 -1
- package/src/img/controls/attention.svg +1 -0
- package/src/locales/en-UK/common.json +79 -16
- package/src/react-api/ApiError/ApiError.js +119 -0
- package/src/react-api/ApiError/ApiError.test.js +43 -0
- package/src/react-api/ApiError/ApiError.test.page.js +107 -0
- package/src/react-api/ApiError/ApiError.test.stories.js +39 -0
- package/src/react-extension/ApiApp.js +17 -5
- package/src/react-extension/ExtApp.js +12 -5
- package/src/react-extension/ExtAuthenticationLogin.js +14 -12
- package/src/react-extension/ExtAuthenticationLogin.test.stories.js +59 -0
- package/src/react-extension/ExtBootstrapApp.js +1 -0
- package/src/react-extension/components/Administration/AdministrationWorkspace.js +24 -0
- package/src/react-extension/components/Administration/AdministrationWorkspace.test.data.js +3 -3
- package/src/react-extension/components/Administration/AdministrationWorkspace.test.js +13 -1
- package/src/react-extension/components/Administration/AdministrationWorkspace.test.page.js +7 -0
- package/src/react-extension/components/Administration/ConfirmDeleteSsoSettingsDialog/ConfirmDeleteSsoSettingsDialog.js +101 -0
- package/src/react-extension/components/Administration/ConfirmDeleteSsoSettingsDialog/ConfirmDeleteSsoSettingsDialog.test.data.js +23 -0
- package/src/react-extension/components/Administration/ConfirmDeleteSsoSettingsDialog/ConfirmDeleteSsoSettingsDialog.test.stories.js +27 -0
- package/src/react-extension/components/Administration/ConfirmSaveAccountRecoverySettings/ConfirmSaveAccountRecoverySettings.js +1 -1
- package/src/react-extension/components/Administration/DisplayAdministrationMenu/DisplayAdministrationMenu.js +78 -2
- package/src/react-extension/components/Administration/DisplayAdministrationMenu/DisplayAdministrationMenu.test.data.js +3 -1
- package/src/react-extension/components/Administration/DisplayAdministrationMenu/DisplayAdministrationMenu.test.js +60 -0
- package/src/react-extension/components/Administration/DisplayAdministrationMenu/DisplayAdministrationMenu.test.page.js +23 -4
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationInternationalisationActions/DisplayAdministrationInternationalisationActions.js +125 -0
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationMfaActions/DisplayAdministrationMfaActions.js +131 -0
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationSelfRegistrationActions/DisplayAdministrationSelfRegistrationActions.js +103 -0
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationSsoActions/DisplayAdministrationSsoActions.js +91 -0
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationSubscriptionActions/DisplayAdministrationSubscriptionActions.js +85 -0
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationUserDirectoryActions/DisplayAdministrationUserDirectoryActions.js +228 -0
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceBreadcrumb/DisplayAdministrationWorkspaceBreadcrumb.js +4 -0
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceBreadcrumb/DisplayAdministrationWorkspaceBreadcrumb.test.js +9 -0
- package/src/react-extension/components/Administration/DisplayEmailNotificationsAdministration/DisplayEmailNotificationsAdministration.js +3 -3
- package/src/react-extension/components/Administration/DisplayEmailNotificationsAdministration/DisplayEmailNotificationsAdministration.test.data.js +14 -0
- package/src/react-extension/components/Administration/DisplayEmailNotificationsAdministration/DisplayEmailNotificationsAdministration.test.page.js +0 -17
- package/src/react-extension/components/Administration/DisplayInternationalizationAdministration/DisplayInternationalizationAdministration.js +18 -115
- package/src/react-extension/components/Administration/DisplayInternationalizationAdministration/DisplayInternationalizationAdministration.test.data.js +11 -13
- package/src/react-extension/components/Administration/DisplayInternationalizationAdministration/DisplayInternationalizationAdministration.test.js +38 -43
- package/src/react-extension/components/Administration/DisplayInternationalizationAdministration/DisplayInternationalizationAdministration.test.page.js +47 -10
- package/src/react-extension/components/Administration/DisplayInternationalizationAdministration/DisplayInternationalizationAdministration.test.stories.js +10 -43
- package/src/react-extension/components/Administration/DisplayMfaAdministration/DisplayMfaAdministration.js +82 -367
- package/src/react-extension/components/Administration/DisplayMfaAdministration/DisplayMfaAdministration.test.data.js +128 -42
- package/src/react-extension/components/Administration/DisplayMfaAdministration/DisplayMfaAdministration.test.js +75 -121
- package/src/react-extension/components/Administration/DisplayMfaAdministration/DisplayMfaAdministration.test.page.js +46 -16
- package/src/react-extension/components/Administration/DisplayMfaAdministration/DisplayMfaAdministration.test.stories.js +18 -14
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmDeletionSelfRegistrationSettings/ConfirmDeletionSelfRegistrationSettings.js +103 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmDeletionSelfRegistrationSettings/ConfirmDeletionSelfRegistrationSettings.test.js +53 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmDeletionSelfRegistrationSettings/ConfirmDeletionSelfRegistrationSettings.test.page.js +81 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmDeletionSelfRegistrationSettings/ConfirmDeletionSelfRegistrationSettings.test.stories.js +34 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmSaveSelfRegistrationSettings/ConfirmSaveSelfRegistrationSettings.js +125 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmSaveSelfRegistrationSettings/ConfirmSaveSelfRegistrationSettings.test.data.js +63 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmSaveSelfRegistrationSettings/ConfirmSaveSelfRegistrationSettings.test.js +54 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmSaveSelfRegistrationSettings/ConfirmSaveSelfRegistrationSettings.test.page.js +88 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmSaveSelfRegistrationSettings/ConfirmSaveSelfRegistrationSettings.test.stories.js +35 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/DisplaySelfRegistrationAdministration.js +381 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/DisplaySelfRegistrationAdministration.test.data.js +69 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/DisplaySelfRegistrationAdministration.test.js +332 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/DisplaySelfRegistrationAdministration.test.page.js +247 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/DisplaySelfRegistrationAdministration.test.stories.js +72 -0
- package/src/react-extension/components/Administration/DisplaySimulateSynchronizeUserDirectoryAdministration/DisplaySimulateSynchronizeUserDirectoryAdministration.js +19 -19
- package/src/react-extension/components/Administration/DisplaySimulateSynchronizeUserDirectoryAdministration/DisplaySimulateSynchronizeUserDirectoryAdministration.test.data.js +1717 -1729
- package/src/react-extension/components/Administration/DisplaySimulateSynchronizeUserDirectoryAdministration/DisplaySimulateSynchronizeUserDirectoryAdministration.test.js +11 -3
- package/src/react-extension/components/Administration/DisplaySimulateSynchronizeUserDirectoryAdministration/DisplaySimulateSynchronizeUserDirectoryAdministration.test.page.js +4 -1
- package/src/react-extension/components/Administration/DisplaySimulateSynchronizeUserDirectoryAdministration/DisplaySimulateSynchronizeUserDirectoryAdministration.test.stories.js +11 -1784
- package/src/react-extension/components/Administration/DisplaySubscriptionKey/DisplaySubscriptionKey.js +41 -140
- package/src/react-extension/components/Administration/DisplaySubscriptionKey/DisplaySubscriptionKey.test.data.js +15 -3
- package/src/react-extension/components/Administration/DisplaySubscriptionKey/DisplaySubscriptionKey.test.js +22 -49
- package/src/react-extension/components/Administration/DisplaySubscriptionKey/DisplaySubscriptionKey.test.page.js +19 -11
- package/src/react-extension/components/Administration/DisplaySubscriptionKey/DisplaySubscriptionKey.test.stories.js +9 -3
- package/src/react-extension/components/Administration/DisplaySynchronizeUserDirectoryAdministration/DisplaySynchronizeUserDirectoryAdministration.js +5 -6
- package/src/react-extension/components/Administration/DisplaySynchronizeUserDirectoryAdministration/DisplaySynchronizeUserDirectoryAdministration.test.data.js +1717 -1728
- package/src/react-extension/components/Administration/DisplaySynchronizeUserDirectoryAdministration/DisplaySynchronizeUserDirectoryAdministration.test.js +11 -3
- package/src/react-extension/components/Administration/DisplaySynchronizeUserDirectoryAdministration/DisplaySynchronizeUserDirectoryAdministration.test.page.js +4 -1
- package/src/react-extension/components/Administration/DisplaySynchronizeUserDirectoryAdministration/DisplaySynchronizeUserDirectoryAdministration.test.stories.js +11 -1784
- package/src/react-extension/components/Administration/DisplayUserDirectoryAdministration/DisplayUserDirectoryAdministration.js +362 -835
- package/src/react-extension/components/Administration/DisplayUserDirectoryAdministration/DisplayUserDirectoryAdministration.test.data.js +427 -418
- package/src/react-extension/components/Administration/DisplayUserDirectoryAdministration/DisplayUserDirectoryAdministration.test.js +134 -175
- package/src/react-extension/components/Administration/DisplayUserDirectoryAdministration/DisplayUserDirectoryAdministration.test.page.js +108 -11
- package/src/react-extension/components/Administration/DisplayUserDirectoryAdministration/DisplayUserDirectoryAdministration.test.stories.js +17 -25
- package/src/react-extension/components/Administration/EditSubscriptionKey/EditSubscriptionKey.js +4 -2
- package/src/react-extension/components/Administration/ManageAccountRecoveryAdministrationSettings/ManageAccountRecoveryAdministrationSettings.js +3 -3
- package/src/react-extension/components/Administration/ManageAccountRecoveryAdministrationSettings/ManageAccountRecoveryAdministrationSettings.test.js +1 -1
- package/src/react-extension/components/Administration/ManageSmtpAdministrationSettings/ManageSmtpAdministrationSettings.js +32 -7
- package/src/react-extension/components/Administration/ManageSmtpAdministrationSettings/ManageSmtpAdministrationSettings.test.data.js +0 -3
- package/src/react-extension/components/Administration/ManageSmtpAdministrationSettings/ManageSmtpAdministrationSettings.test.js +145 -1
- package/src/react-extension/components/Administration/ManageSmtpAdministrationSettings/ManageSmtpAdministrationSettings.test.page.js +52 -1
- package/src/react-extension/components/Administration/ManageSmtpAdministrationSettings/ManageSmtpAdministrationSettings.test.stories.js +15 -0
- package/src/react-extension/components/Administration/ManageSsoSettings/ManageSsoSettings.js +340 -0
- package/src/react-extension/components/Administration/ManageSsoSettings/ManageSsoSettings.test.data.js +56 -0
- package/src/react-extension/components/Administration/ManageSsoSettings/ManageSsoSettings.test.js +223 -0
- package/src/react-extension/components/Administration/ManageSsoSettings/ManageSsoSettings.test.page.js +235 -0
- package/src/react-extension/components/Administration/ManageSsoSettings/ManageSsoSettings.test.stories.js +55 -0
- package/src/react-extension/components/Administration/ManageSsoSettings/SsoProviders.data.js +34 -0
- package/src/react-extension/components/Administration/SelectAccountRecoveryOrganizationKey/GenerateOrganizationKey.js +12 -3
- package/src/react-extension/components/Administration/SelectAccountRecoveryOrganizationKey/GenerateOrganizationKey.test.js +27 -0
- package/src/react-extension/components/Administration/SelectAccountRecoveryOrganizationKey/SelectAccountRecoveryOrganizationKey.test.page.js +8 -0
- package/src/react-extension/components/Administration/TestSsoSettingsDialog/TestSsoSettingsDialog.js +197 -0
- package/src/react-extension/components/Administration/TestSsoSettingsDialog/TestSsoSettingsDialog.test.data.js +37 -0
- package/src/react-extension/components/Administration/TestSsoSettingsDialog/TestSsoSettingsDialog.test.js +187 -0
- package/src/react-extension/components/Administration/TestSsoSettingsDialog/TestSsoSettingsDialog.test.page.js +120 -0
- package/src/react-extension/components/Administration/TestSsoSettingsDialog/TestSsoSettingsDialog.test.stories.js +31 -0
- package/src/react-extension/components/Authentication/CheckPassphrase/CheckPassphrase.js +9 -5
- package/src/react-extension/components/Authentication/CheckPassphrase/CheckPassphrase.test.data.js +4 -0
- package/src/react-extension/components/Authentication/CheckPassphrase/CheckPassphrase.test.js +11 -42
- package/src/react-extension/components/Authentication/CheckPassphrase/CheckPassphrase.test.page.js +1 -0
- package/src/react-extension/components/Authentication/CreateGpgKey/CreateGpgKey.js +9 -5
- package/src/react-extension/components/Authentication/CreateGpgKey/CreateGpgKey.test.data.js +4 -0
- package/src/react-extension/components/Authentication/CreateGpgKey/CreateGpgKey.test.js +16 -2
- package/src/react-extension/components/Authentication/CreateGpgKey/CreateGpgKey.test.page.js +17 -1
- package/src/react-extension/components/AuthenticationLogin/Login/Login.js +177 -63
- package/src/react-extension/components/AuthenticationLogin/Login/Login.test.data.js +19 -11
- package/src/react-extension/components/AuthenticationLogin/Login/Login.test.js +93 -0
- package/src/react-extension/components/AuthenticationLogin/Login/Login.test.page.js +16 -0
- package/src/react-extension/components/AuthenticationLogin/OrchestrateLogin/OrchestrateLoginBoxMain.js +1 -0
- package/src/react-extension/components/AuthenticationSetup/SetupAuthentication/SetupAuthentication.js +4 -0
- package/src/react-extension/components/Common/Error/ApiError/ApiError.js +119 -0
- package/src/react-extension/components/Common/Error/ApiError/ApiError.test.js +43 -0
- package/src/react-extension/components/Common/Error/ApiError/ApiError.test.page.js +108 -0
- package/src/react-extension/components/Common/Error/ApiError/ApiError.test.stories.js +39 -0
- package/src/react-extension/components/Common/Inputs/Autocomplete/Autocomplete.test.js +12 -0
- package/src/react-extension/components/Common/Inputs/Autocomplete/AutocompleteItem.js +2 -2
- package/src/react-extension/components/Common/Legacy/HandleLegacyAppjs.js +1 -1
- package/src/react-extension/components/Common/Navigation/Header/Logo.js +13 -1
- package/src/react-extension/components/Resource/CreateResource/CreateResource.js +103 -30
- package/src/react-extension/components/Resource/CreateResource/CreateResource.test.js +44 -10
- package/src/react-extension/components/Resource/CreateResource/CreateResource.test.page.js +35 -7
- package/src/react-extension/components/Resource/DisplayResourcesList/DisplayResourcesList.js +3 -3
- package/src/react-extension/components/Resource/DisplayResourcesList/DisplayResourcesListContextualMenu.js +6 -5
- package/src/react-extension/components/Resource/DisplayResourcesWorkspace/DisplayResourcesWorkspaceMenu.js +5 -4
- package/src/react-extension/components/Resource/EditResource/EditResource.js +95 -23
- package/src/react-extension/components/Resource/EditResource/EditResource.test.js +45 -13
- package/src/react-extension/components/Resource/EditResource/EditResource.test.page.js +35 -2
- package/src/react-extension/components/ResourceDetails/DisplayResourceDetails/DisplayResourceDetails.js +2 -1
- package/src/react-extension/components/ResourceDetails/DisplayResourceDetails/DisplayResourceDetailsInformation.js +3 -2
- package/src/react-extension/components/ResourceFolder/CreateResourceFolder/CreateResourceFolder.js +23 -2
- package/src/react-extension/components/ResourceFolder/CreateResourceFolder/CreateResourceFolder.test.js +8 -0
- package/src/react-extension/components/ResourceFolder/CreateResourceFolder/CreateResourceFolder.test.page.js +26 -2
- package/src/react-extension/components/ResourceFolder/RenameResourceFolder/RenameResourceFolder.js +22 -1
- package/src/react-extension/components/ResourceFolder/RenameResourceFolder/RenameResourceFolder.test.js +8 -0
- package/src/react-extension/components/ResourceFolder/RenameResourceFolder/RenameResourceFolder.test.page.js +25 -2
- package/src/react-extension/components/ResourceFolderDetails/DisplayResourceFolderDetails/DisplayResourceFolderDetails.js +2 -1
- package/src/react-extension/components/ResourcePassword/GenerateResourcePassword/GenerateResourcePassword.js +2 -1
- package/src/react-extension/components/ResourceTag/EditResourceTag/EditResourceTag.js +14 -1
- package/src/react-extension/components/ResourceTag/EditResourceTag/EditResourceTag.test.js +8 -0
- package/src/react-extension/components/ResourceTag/EditResourceTag/EditResourceTag.test.page.js +12 -0
- package/src/react-extension/components/User/CreateUser/CreateUser.js +42 -3
- package/src/react-extension/components/User/CreateUser/CreateUser.test.js +16 -0
- package/src/react-extension/components/User/CreateUser/CreateUser.test.page.js +26 -0
- package/src/react-extension/components/User/DisplayUserWorkspaceActions/DisplayUserWorkspaceActions.js +2 -1
- package/src/react-extension/components/User/DisplayUsersContextualMenu/DisplayUsersContextualMenu.js +5 -5
- package/src/react-extension/components/User/EditUser/EditUser.js +29 -2
- package/src/react-extension/components/User/EditUser/EditUser.test.js +12 -0
- package/src/react-extension/components/User/EditUser/EditUser.test.page.js +26 -0
- package/src/react-extension/components/UserDetails/DisplayUserDetails/DisplayUserDetails.js +2 -1
- package/src/react-extension/components/UserDetails/DisplayUserDetails/DisplayUserDetails.test.data.js +1332 -1331
- package/src/react-extension/components/UserDetails/DisplayUserDetailsPublicKey/DisplayUserDetailsPublicKey.js +2 -1
- package/src/react-extension/components/UserGroup/CreateUserGroup/CreateUserGroup.js +19 -1
- package/src/react-extension/components/UserGroup/CreateUserGroup/CreateUserGroup.test.js +9 -0
- package/src/react-extension/components/UserGroup/CreateUserGroup/CreateUserGroup.test.page.js +12 -0
- package/src/react-extension/components/UserGroup/DisplayUserGroupDetails/DisplayUserGroupDetails.js +2 -1
- package/src/react-extension/components/UserGroup/EditUserGroup/EditUserGroup.js +16 -1
- package/src/react-extension/components/UserGroup/EditUserGroup/EditUserGroup.test.js +8 -0
- package/src/react-extension/components/UserGroup/EditUserGroup/EditUserGroup.test.page.js +26 -1
- package/src/react-extension/components/UserSetting/ChangeUserPassphrase/ConfirmPassphrase.js +1 -1
- package/src/react-extension/components/UserSetting/ChangeUserPassphrase/EnterNewPassphrase.js +6 -4
- package/src/react-extension/components/UserSetting/ChangeUserPassphrase/EnterNewPassphrase.test.data.js +4 -1
- package/src/react-extension/components/UserSetting/ChangeUserPassphrase/EnterNewPassphrase.test.js +21 -11
- package/src/react-extension/components/UserSetting/ChangeUserPassphrase/EnterNewPassphrase.test.page.js +10 -1
- package/src/react-extension/contexts/AdminSmtpSettingsContext.js +2 -0
- package/src/react-extension/contexts/AdminSmtpSettingsContext.test.data.js +13 -0
- package/src/react-extension/contexts/AdminSmtpSettingsContext.test.js +3 -1
- package/src/react-extension/contexts/AdminSsoContext.js +558 -0
- package/src/react-extension/contexts/AdminSsoContext.test.data.js +51 -0
- package/src/react-extension/contexts/Administration/AdministrationInternationalizationContext/AdministrationInternationalizationContext.js +194 -0
- package/src/react-extension/contexts/Administration/AdministrationInternationalizationContext/AdministrationInternationalizationContext.test.js +111 -0
- package/src/react-extension/contexts/Administration/AdministrationMfa/AdministrationMfaContext.js +265 -0
- package/src/react-extension/contexts/Administration/AdministrationMfa/AdministrationMfaContext.test.js +178 -0
- package/src/react-extension/contexts/Administration/AdministrationSelfRegistration/AdministrationSelfRegistrationContext.js +453 -0
- package/src/react-extension/contexts/Administration/AdministrationSelfRegistration/AdministrationSelfRegistrationContext.test.js +218 -0
- package/src/react-extension/contexts/Administration/AdministrationSubscription/AdministrationSubscription.js +168 -0
- package/src/react-extension/contexts/Administration/AdministrationSubscription/AdministrationSubscription.test.js +73 -0
- package/src/react-extension/contexts/Administration/AdministrationUserDirectory/AdministrationUserDirectoryContext.js +353 -0
- package/src/react-extension/contexts/Administration/AdministrationUserDirectory/AdministrationUserDirectoryContext.test.js +220 -0
- package/src/react-extension/contexts/AdministrationWorkspaceContext.js +17 -178
- package/src/react-extension/contexts/AdministrationWorkspaceContext.test.js +0 -26
- package/src/react-extension/contexts/ApiAppContext.test.data.js +4 -2
- package/src/react-extension/contexts/Authentication/AuthenticationLoginContext.js +11 -0
- package/src/react-extension/contexts/Authentication/AuthenticationSetupContext.js +1 -0
- package/src/react-extension/contexts/NavigationContext.js +34 -0
- package/src/react-extension/contexts/SsoContext.js +151 -0
- package/src/react-extension/lib/Domain/DomainUtil.js +70 -0
- package/src/react-extension/lib/Domain/DomainUtil.test.js +129 -0
- package/src/react-extension/lib/Domain/Domains.js +6113 -0
- package/src/react-extension/lib/Error/InputValidator.js +24 -0
- package/src/react-extension/lib/Map/DynamicRef.js +49 -0
- package/src/react-extension/lib/Map/DynamicRef.test.js +56 -0
- package/src/react-extension/lib/Map/MapObject.js +48 -0
- package/src/react-extension/lib/Map/MapObject.test.js +43 -0
- package/src/react-quickaccess/ExtQuickAccess.js +7 -4
- package/src/react-quickaccess/components/GeneratePasswordPage/GeneratePasswordPage.js +3 -1
- package/src/react-quickaccess/components/GeneratePasswordPage/GeneratePasswordPage.test.data.js +4 -0
- package/src/react-quickaccess/components/LoginPage/LoginPage.js +115 -4
- package/src/react-quickaccess/components/LoginPage/LoginPage.test.data.js +10 -0
- package/src/react-quickaccess/components/LoginPage/LoginPage.test.stories.js +30 -3
- package/src/react-quickaccess/components/ResourceAutoSave/SaveResource.js +33 -1
- package/src/react-quickaccess/components/ResourceAutoSave/SaveResource.test.data.js +25 -0
- package/src/react-quickaccess/components/ResourceAutoSave/SaveResource.test.js +60 -0
- package/src/react-quickaccess/components/ResourceAutoSave/SaveResource.test.page.js +60 -0
- package/src/react-quickaccess/components/ResourceCreatePage/ResourceCreatePage.js +33 -1
- package/src/react-quickaccess/components/ResourceCreatePage/ResourceCreatePage.test.js +36 -7
- package/src/react-quickaccess/components/ResourceViewPage/ResourceViewPage.js +3 -2
- package/src/react-quickaccess/contexts/SsoContext.js +150 -0
- package/src/react-web-integration/lib/InForm/InFormFieldSelector.js +5 -0
- package/src/shared/constants/inputs.const.js +30 -0
- package/src/shared/lib/Browser/clipBoard.js +45 -0
- package/src/shared/lib/Browser/clipBoard.test.js +59 -0
- package/src/shared/models/Mfa/Duo.js +36 -0
- package/src/shared/models/Mfa/Duo.test.js +59 -0
- package/src/shared/models/Mfa/MfaDTO.js +51 -0
- package/src/shared/models/Mfa/MfaDTO.test.js +48 -0
- package/src/shared/models/Mfa/MfaEnumeration.js +17 -0
- package/src/shared/models/Mfa/MfaModel.js +48 -0
- package/src/shared/models/Mfa/MfaModel.test.js +37 -0
- package/src/shared/models/Mfa/Yubikey.js +35 -0
- package/src/shared/models/Mfa/Yubikey.test.js +47 -0
- package/src/shared/models/selfRegistration/SelfRegistrationDomainsViewModel.js +55 -0
- package/src/shared/models/selfRegistration/SelfRegistrationDomainsViewModel.test.js +37 -0
- package/src/shared/models/selfRegistration/SelfRegistrationDto.js +42 -0
- package/src/shared/models/selfRegistration/SelfRegistrationDto.test.js +48 -0
- package/src/shared/models/selfRegistration/SelfRegistrationEnumeration.js +17 -0
- package/src/shared/models/subscription/SubscriptionDto.js +34 -0
- package/src/shared/models/subscription/SubscriptionDto.test.js +31 -0
- package/src/shared/models/subscription/SubscriptionModel.js +33 -0
- package/src/shared/models/subscription/SubscriptionModel.test.js +48 -0
- package/src/shared/models/user/UserModel.js +37 -0
- package/src/shared/models/userDirectory/UserDirectoryDTO.js +57 -0
- package/src/shared/models/userDirectory/UserDirectoryDTO.test.js +40 -0
- package/src/shared/models/userDirectory/UserDirectoryEnum.js +22 -0
- package/src/shared/models/userDirectory/UserDirectoryModel.js +64 -0
- package/src/shared/models/userDirectory/UserDirectoryModel.test.js +37 -0
- package/src/shared/services/actions/subscription/SubscriptionActionService.js +69 -0
- package/src/shared/services/actions/subscription/SubscriptionActionService.test.js +73 -0
- package/src/shared/services/api/Internationalisation/InternationalisationService.js +46 -0
- package/src/shared/services/api/Mfa/MfaService.js +54 -0
- package/src/shared/services/{accountRecovery → api/accountRecovery}/ApiAppAccountRecoveryUserService.js +2 -2
- package/src/shared/services/{accountRecovery → api/accountRecovery}/ExtAppAccountRecoveryUserService.js +0 -0
- package/src/shared/services/api/secrets/pownedService.js +64 -0
- package/src/shared/services/api/secrets/pownedService.test.js +63 -0
- package/src/shared/services/api/selfRegistration/selfRegistrationService.js +64 -0
- package/src/shared/services/api/user/UserService.js +45 -0
- package/src/shared/services/api/userDirectory/UserDirectoryService.js +108 -0
- package/src/shared/services/forms/Mfa/MfaFormService.js +195 -0
- package/src/shared/services/forms/Mfa/MfaFormService.test.js +341 -0
- package/src/shared/services/forms/selfRegistration/SelfRegistrationFormService.js +92 -0
- package/src/shared/services/forms/selfRegistration/SelfRegistrationFormService.test.js +101 -0
- package/src/shared/services/forms/userDirectory/UserDirectoryFormService.js +118 -0
- package/src/shared/services/forms/userDirectory/UserDirectoryFormService.test.js +128 -0
- package/.gitlab-ci-local/.gitignore +0 -2
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationWorkspaceActions.js +0 -205
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationWorkspaceActions.test.data.js +0 -37
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationWorkspaceActions.test.js +0 -197
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationWorkspaceActions.test.page.js +0 -133
|
@@ -31,13 +31,15 @@ import {SecretGenerator} from "../../../../shared/lib/SecretGenerator/SecretGene
|
|
|
31
31
|
import {withResourcePasswordGeneratorContext} from "../../../contexts/ResourcePasswordGeneratorContext";
|
|
32
32
|
import Password from "../../../../shared/components/Password/Password";
|
|
33
33
|
import PasswordComplexity from "../../../../shared/components/PasswordComplexity/PasswordComplexity";
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
import {maxSizeValidation} from "../../../lib/Error/InputValidator";
|
|
35
|
+
import {
|
|
36
|
+
RESOURCE_NAME_MAX_LENGTH,
|
|
37
|
+
RESOURCE_PASSWORD_MAX_LENGTH,
|
|
38
|
+
RESOURCE_URI_MAX_LENGTH,
|
|
39
|
+
RESOURCE_DESCRIPTION_MAX_LENGTH,
|
|
40
|
+
} from "../../../../shared/constants/inputs.const";
|
|
41
|
+
import debounce from "debounce-promise";
|
|
42
|
+
import PownedService from "../../../../shared/services/api/secrets/pownedService";
|
|
41
43
|
|
|
42
44
|
class CreateResource extends Component {
|
|
43
45
|
constructor() {
|
|
@@ -45,16 +47,21 @@ class CreateResource extends Component {
|
|
|
45
47
|
this.state = this.getDefaultState();
|
|
46
48
|
this.initEventHandlers();
|
|
47
49
|
this.createInputRef();
|
|
50
|
+
this.isPwndProcessingPromise = null;
|
|
51
|
+
this.evaluatePasswordIsInDictionaryDebounce = debounce(this.evaluatePasswordIsInDictionaryDebounce, 300);
|
|
48
52
|
}
|
|
49
53
|
|
|
50
54
|
getDefaultState() {
|
|
51
55
|
return {
|
|
52
56
|
name: "",
|
|
53
57
|
nameError: "",
|
|
58
|
+
nameWarning: "",
|
|
54
59
|
username: "",
|
|
55
60
|
usernameError: "",
|
|
61
|
+
usernameWarning: "",
|
|
56
62
|
uri: "",
|
|
57
63
|
uriError: "",
|
|
64
|
+
uriWarning: "",
|
|
58
65
|
password: "",
|
|
59
66
|
passwordError: "",
|
|
60
67
|
passwordWarning: "",
|
|
@@ -62,7 +69,9 @@ class CreateResource extends Component {
|
|
|
62
69
|
descriptionError: "",
|
|
63
70
|
descriptionWarning: "",
|
|
64
71
|
encryptDescription: false,
|
|
65
|
-
hasAlreadyBeenValidated: false // True if the form has already been submitted once
|
|
72
|
+
hasAlreadyBeenValidated: false, // True if the form has already been submitted once
|
|
73
|
+
isPwnedServiceAvailable: true,
|
|
74
|
+
passwordInDictionary: false
|
|
66
75
|
};
|
|
67
76
|
}
|
|
68
77
|
|
|
@@ -75,6 +84,8 @@ class CreateResource extends Component {
|
|
|
75
84
|
this.handleGeneratePasswordButtonClick = this.handleGeneratePasswordButtonClick.bind(this);
|
|
76
85
|
this.handleDescriptionToggle = this.handleDescriptionToggle.bind(this);
|
|
77
86
|
this.handleDescriptionInputKeyUp = this.handleDescriptionInputKeyUp.bind(this);
|
|
87
|
+
this.handleUriInputKeyUp = this.handleUriInputKeyUp.bind(this);
|
|
88
|
+
this.handleUsernameInputKeyUp = this.handleUsernameInputKeyUp.bind(this);
|
|
78
89
|
this.handleOpenGenerator = this.handleOpenGenerator.bind(this);
|
|
79
90
|
this.handleLastGeneratedPasswordChanged = this.handleLastGeneratedPasswordChanged.bind(this);
|
|
80
91
|
}
|
|
@@ -91,6 +102,7 @@ class CreateResource extends Component {
|
|
|
91
102
|
* Whenever the component has been mounted
|
|
92
103
|
*/
|
|
93
104
|
componentDidMount() {
|
|
105
|
+
this.pownedService = new PownedService(this.props.context.port);
|
|
94
106
|
if (this.isEncryptedDescriptionEnabled()) {
|
|
95
107
|
this.setState({encryptDescription: true});
|
|
96
108
|
}
|
|
@@ -101,7 +113,9 @@ class CreateResource extends Component {
|
|
|
101
113
|
* @param prevProps The previous component props
|
|
102
114
|
*/
|
|
103
115
|
componentDidUpdate(prevProps) {
|
|
104
|
-
this.handleLastGeneratedPasswordChanged(
|
|
116
|
+
this.handleLastGeneratedPasswordChanged(
|
|
117
|
+
prevProps.resourcePasswordGeneratorContext.lastGeneratedPassword
|
|
118
|
+
);
|
|
105
119
|
}
|
|
106
120
|
|
|
107
121
|
/*
|
|
@@ -111,7 +125,9 @@ class CreateResource extends Component {
|
|
|
111
125
|
*/
|
|
112
126
|
get currentGeneratorConfiguration() {
|
|
113
127
|
const type = this.props.resourcePasswordGeneratorContext.settings.default_generator;
|
|
114
|
-
return this.props.resourcePasswordGeneratorContext.settings.generators.find(
|
|
128
|
+
return this.props.resourcePasswordGeneratorContext.settings.generators.find(
|
|
129
|
+
generator => generator.type === type
|
|
130
|
+
);
|
|
115
131
|
}
|
|
116
132
|
|
|
117
133
|
/**
|
|
@@ -155,7 +171,6 @@ class CreateResource extends Component {
|
|
|
155
171
|
*/
|
|
156
172
|
async handleFormSubmit(event) {
|
|
157
173
|
event.preventDefault();
|
|
158
|
-
|
|
159
174
|
if (this.state.processing) {
|
|
160
175
|
return;
|
|
161
176
|
}
|
|
@@ -205,7 +220,7 @@ class CreateResource extends Component {
|
|
|
205
220
|
uriError: "",
|
|
206
221
|
usernameError: "",
|
|
207
222
|
passwordError: "",
|
|
208
|
-
descriptionError: ""
|
|
223
|
+
descriptionError: "",
|
|
209
224
|
});
|
|
210
225
|
|
|
211
226
|
// Validate the form inputs.
|
|
@@ -249,6 +264,17 @@ class CreateResource extends Component {
|
|
|
249
264
|
});
|
|
250
265
|
}
|
|
251
266
|
|
|
267
|
+
/**
|
|
268
|
+
* Evaluate to check if password is in a dictionary.
|
|
269
|
+
* @return {Promise}
|
|
270
|
+
*/
|
|
271
|
+
async evaluatePasswordIsInDictionaryDebounce() {
|
|
272
|
+
if (this.state.isPwnedServiceAvailable) {
|
|
273
|
+
const result = await this.pownedService.evaluateSecret(this.state.password);
|
|
274
|
+
this.setState({isPwnedServiceAvailable: result.isPwnedServiceAvailable, passwordInDictionary: result.inDictionary});
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
252
278
|
/*
|
|
253
279
|
* =============================================================
|
|
254
280
|
* Create resource
|
|
@@ -263,7 +289,7 @@ class CreateResource extends Component {
|
|
|
263
289
|
name: this.state.name,
|
|
264
290
|
username: this.state.username,
|
|
265
291
|
uri: this.state.uri,
|
|
266
|
-
folder_parent_id: this.props.context.resourceCreateDialogProps.folderParentId
|
|
292
|
+
folder_parent_id: this.props.context.resourceCreateDialogProps.folderParentId,
|
|
267
293
|
};
|
|
268
294
|
|
|
269
295
|
// No resource types, legacy case
|
|
@@ -369,7 +395,7 @@ class CreateResource extends Component {
|
|
|
369
395
|
*/
|
|
370
396
|
handleError(error) {
|
|
371
397
|
const errorDialogProps = {
|
|
372
|
-
error: error
|
|
398
|
+
error: error,
|
|
373
399
|
};
|
|
374
400
|
this.props.dialogContext.open(NotifyError, errorDialogProps);
|
|
375
401
|
}
|
|
@@ -420,8 +446,14 @@ class CreateResource extends Component {
|
|
|
420
446
|
const target = event.target;
|
|
421
447
|
const value = target.value;
|
|
422
448
|
const name = target.name;
|
|
449
|
+
|
|
450
|
+
if (name === "password") {
|
|
451
|
+
if (value.length) {
|
|
452
|
+
this.isPwndProcessingPromise = this.evaluatePasswordIsInDictionaryDebounce();
|
|
453
|
+
}
|
|
454
|
+
}
|
|
423
455
|
this.setState({
|
|
424
|
-
[name]: value
|
|
456
|
+
[name]: value,
|
|
425
457
|
});
|
|
426
458
|
}
|
|
427
459
|
|
|
@@ -432,6 +464,9 @@ class CreateResource extends Component {
|
|
|
432
464
|
if (this.state.hasAlreadyBeenValidated) {
|
|
433
465
|
const state = this.validateNameInput();
|
|
434
466
|
this.setState(state);
|
|
467
|
+
} else {
|
|
468
|
+
const nameWarning = maxSizeValidation(this.state.name, RESOURCE_NAME_MAX_LENGTH, this.translate);
|
|
469
|
+
this.setState({nameWarning});
|
|
435
470
|
}
|
|
436
471
|
}
|
|
437
472
|
|
|
@@ -443,9 +478,7 @@ class CreateResource extends Component {
|
|
|
443
478
|
const state = this.validatePasswordInput();
|
|
444
479
|
this.setState(state);
|
|
445
480
|
} else {
|
|
446
|
-
const
|
|
447
|
-
const warningMessage = this.translate("this is the maximum size for this field, make sure your data was not truncated");
|
|
448
|
-
const passwordWarning = hasResourcePasswordMaxLength ? warningMessage : '';
|
|
481
|
+
const passwordWarning = maxSizeValidation(this.state.password, RESOURCE_PASSWORD_MAX_LENGTH, this.translate);
|
|
449
482
|
this.setState({passwordWarning});
|
|
450
483
|
}
|
|
451
484
|
}
|
|
@@ -459,9 +492,10 @@ class CreateResource extends Component {
|
|
|
459
492
|
}
|
|
460
493
|
|
|
461
494
|
const password = SecretGenerator.generate(this.currentGeneratorConfiguration);
|
|
495
|
+
|
|
462
496
|
this.setState({
|
|
463
497
|
password: password,
|
|
464
|
-
passwordError: ""
|
|
498
|
+
passwordError: "",
|
|
465
499
|
});
|
|
466
500
|
}
|
|
467
501
|
|
|
@@ -498,20 +532,37 @@ class CreateResource extends Component {
|
|
|
498
532
|
*/
|
|
499
533
|
handleDescriptionInputKeyUp() {
|
|
500
534
|
if (!this.state.hasAlreadyBeenValidated) {
|
|
501
|
-
const
|
|
502
|
-
|
|
503
|
-
const warningMessage = this.translate("this is the maximum size for this field, make sure your data was not truncated");
|
|
504
|
-
const descriptionWarning = hasResourceDescriptionMaxLength ? warningMessage : '';
|
|
535
|
+
const descriptionWarning = maxSizeValidation(this.state.description, RESOURCE_DESCRIPTION_MAX_LENGTH, this.translate);
|
|
505
536
|
this.setState({descriptionWarning});
|
|
506
537
|
}
|
|
507
538
|
}
|
|
508
539
|
|
|
540
|
+
/**
|
|
541
|
+
* Whenever the user input keys in the name area
|
|
542
|
+
*/
|
|
543
|
+
handleUriInputKeyUp() {
|
|
544
|
+
if (!this.state.hasAlreadyBeenValidated) {
|
|
545
|
+
const uriWarning = maxSizeValidation(this.state.uri, RESOURCE_URI_MAX_LENGTH, this.translate);
|
|
546
|
+
this.setState({uriWarning});
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* Whenever the user input keys in the username area
|
|
552
|
+
*/
|
|
553
|
+
handleUsernameInputKeyUp() {
|
|
554
|
+
if (!this.state.hasAlreadyBeenValidated) {
|
|
555
|
+
const usernameWarning = maxSizeValidation(this.state.username, RESOURCE_NAME_MAX_LENGTH, this.translate);
|
|
556
|
+
this.setState({usernameWarning});
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
|
|
509
560
|
/**
|
|
510
561
|
* Returns true if the logged in user can use the password generator capability.
|
|
511
562
|
* @returns {boolean}
|
|
512
563
|
*/
|
|
513
564
|
get canUsePasswordGenerator() {
|
|
514
|
-
return this.props.context.siteSettings.canIUse(
|
|
565
|
+
return this.props.context.siteSettings.canIUse("passwordGenerator");
|
|
515
566
|
}
|
|
516
567
|
|
|
517
568
|
/**
|
|
@@ -536,7 +587,7 @@ class CreateResource extends Component {
|
|
|
536
587
|
<form onSubmit={this.handleFormSubmit} noValidate>
|
|
537
588
|
<div className="form-content">
|
|
538
589
|
<div className={`input text required ${this.state.nameError ? "error" : ""} ${this.state.processing ? 'disabled' : ''}`}>
|
|
539
|
-
<label htmlFor="create-password-form-name"><Trans>Name</Trans
|
|
590
|
+
<label htmlFor="create-password-form-name"><Trans>Name</Trans>{this.state.nameWarning && <Icon name="exclamation" />}</label>
|
|
540
591
|
<input id="create-password-form-name" name="name" type="text" value={this.state.name}
|
|
541
592
|
onKeyUp={this.handleNameInputKeyUp} onChange={this.handleInputChange}
|
|
542
593
|
disabled={this.state.processing} ref={this.nameInputRef} className="required fluid" maxLength="255"
|
|
@@ -544,29 +595,44 @@ class CreateResource extends Component {
|
|
|
544
595
|
{this.state.nameError &&
|
|
545
596
|
<div className="name error-message">{this.state.nameError}</div>
|
|
546
597
|
}
|
|
598
|
+
{this.state.nameWarning && (
|
|
599
|
+
<div className="name warning-message">
|
|
600
|
+
<strong><Trans>Warning:</Trans></strong> {this.state.nameWarning}
|
|
601
|
+
</div>
|
|
602
|
+
)}
|
|
547
603
|
</div>
|
|
548
604
|
<div className={`input text ${this.state.uriError ? "error" : ""} ${this.state.processing ? 'disabled' : ''}`}>
|
|
549
|
-
<label htmlFor="create-password-form-uri"><Trans>URI</Trans
|
|
550
|
-
<input id="create-password-form-uri" name="uri" className="fluid" maxLength="1024" type="text"
|
|
605
|
+
<label htmlFor="create-password-form-uri"><Trans>URI</Trans>{this.state.uriWarning && <Icon name="exclamation" />}</label>
|
|
606
|
+
<input id="create-password-form-uri" name="uri" className="fluid" maxLength="1024" type="text" onKeyUp={this.handleUriInputKeyUp}
|
|
551
607
|
autoComplete="off" value={this.state.uri} onChange={this.handleInputChange} placeholder={this.translate("URI")}
|
|
552
608
|
disabled={this.state.processing}/>
|
|
553
609
|
{this.state.uriError &&
|
|
554
610
|
<div className="error-message">{this.state.uriError}</div>
|
|
555
611
|
}
|
|
612
|
+
{this.state.uriWarning && (
|
|
613
|
+
<div className="uri warning-message">
|
|
614
|
+
<strong><Trans>Warning:</Trans></strong> {this.state.uriWarning}
|
|
615
|
+
</div>
|
|
616
|
+
)}
|
|
556
617
|
</div>
|
|
557
618
|
<div className={`input text ${this.state.usernameError ? "error" : ""} ${this.state.processing ? 'disabled' : ''}`}>
|
|
558
|
-
<label htmlFor="create-password-form-username"><Trans>Username</Trans
|
|
559
|
-
<input id="create-password-form-username" name="username" type="text" className="fluid" maxLength="255"
|
|
619
|
+
<label htmlFor="create-password-form-username"><Trans>Username</Trans>{this.state.usernameWarning && <Icon name="exclamation" />}</label>
|
|
620
|
+
<input id="create-password-form-username" name="username" type="text" className="fluid" maxLength="255" onKeyUp={this.handleUsernameInputKeyUp}
|
|
560
621
|
autoComplete="off" value={this.state.username} onChange={this.handleInputChange} placeholder={this.translate("Username")}
|
|
561
622
|
disabled={this.state.processing}/>
|
|
562
623
|
{this.state.usernameError &&
|
|
563
624
|
<div className="error-message">{this.state.usernameError}</div>
|
|
564
625
|
}
|
|
626
|
+
{this.state.usernameWarning && (
|
|
627
|
+
<div className="username warning-message">
|
|
628
|
+
<strong><Trans>Warning:</Trans></strong> {this.state.usernameWarning}
|
|
629
|
+
</div>
|
|
630
|
+
)}
|
|
565
631
|
</div>
|
|
566
632
|
<div className={`input-password-wrapper input required ${this.state.passwordError ? "error" : ""} ${this.state.processing ? 'disabled' : ''}`}>
|
|
567
633
|
<label htmlFor="create-password-form-password">
|
|
568
634
|
<Trans>Password</Trans>
|
|
569
|
-
{this.state.passwordWarning &&
|
|
635
|
+
{(this.state.passwordWarning || this.state.passwordInDictionary || !this.state.isPwnedServiceAvailable) &&
|
|
570
636
|
<Icon name="exclamation"/>
|
|
571
637
|
}
|
|
572
638
|
</label>
|
|
@@ -601,6 +667,12 @@ class CreateResource extends Component {
|
|
|
601
667
|
{this.state.passwordWarning &&
|
|
602
668
|
<div className="password warning-message"><strong><Trans>Warning:</Trans></strong> {this.state.passwordWarning}</div>
|
|
603
669
|
}
|
|
670
|
+
{!this.state.isPwnedServiceAvailable &&
|
|
671
|
+
<div className="pwned-password warning-message"><Trans>The pwnedpasswords service is unavailable, your password might be part of an exposed data breach</Trans></div>
|
|
672
|
+
}
|
|
673
|
+
{this.state.passwordInDictionary &&
|
|
674
|
+
<div className="pwned-password warning-message"><Trans>The password is part of an exposed data breach.</Trans></div>
|
|
675
|
+
}
|
|
604
676
|
</div>
|
|
605
677
|
<div className={`input textarea ${this.state.processing ? 'disabled' : ''}`}>
|
|
606
678
|
<label htmlFor="create-password-form-description"><Trans>Description</Trans>
|
|
@@ -660,3 +732,4 @@ CreateResource.propTypes = {
|
|
|
660
732
|
};
|
|
661
733
|
|
|
662
734
|
export default withResourcePasswordGeneratorContext(withAppContext(withActionFeedback(withRouter(withDialog(withTranslation('common')(CreateResource))))));
|
|
735
|
+
|
|
@@ -37,7 +37,7 @@ describe("See the Create Resource", () => {
|
|
|
37
37
|
folderParentId: null
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
const mockContextRequest = implementation => jest.spyOn(context.port, 'request').
|
|
40
|
+
const mockContextRequest = implementation => jest.spyOn(context.port, 'request').mockImplementationOnce(implementation);
|
|
41
41
|
const truncatedWarningMessage = "Warning: this is the maximum size for this field, make sure your data was not truncated.";
|
|
42
42
|
describe('As LU I can start adding a password', () => {
|
|
43
43
|
/**
|
|
@@ -46,6 +46,11 @@ describe("See the Create Resource", () => {
|
|
|
46
46
|
beforeEach(() => {
|
|
47
47
|
context.setContext({resourceCreateDialogProps});
|
|
48
48
|
page = new CreateResourcePage(context, props);
|
|
49
|
+
jest.useFakeTimers();
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
afterEach(() => {
|
|
53
|
+
jest.clearAllTimers();
|
|
49
54
|
});
|
|
50
55
|
|
|
51
56
|
it('matches the styleguide', () => {
|
|
@@ -102,8 +107,10 @@ describe("See the Create Resource", () => {
|
|
|
102
107
|
|
|
103
108
|
it('views password when clicking on the view button.', async() => {
|
|
104
109
|
expect.assertions(8);
|
|
110
|
+
mockContextRequest(() => Promise(0));
|
|
105
111
|
const passwordValue = "secret-decrypted";
|
|
106
|
-
page.passwordCreate.
|
|
112
|
+
await page.passwordCreate.fillInputPassword(passwordValue);
|
|
113
|
+
|
|
107
114
|
// View password
|
|
108
115
|
await page.passwordCreate.click(page.passwordCreate.passwordViewButton);
|
|
109
116
|
expect(page.passwordCreate.password.value).toBe(passwordValue);
|
|
@@ -137,7 +144,8 @@ describe("See the Create Resource", () => {
|
|
|
137
144
|
page.passwordCreate.fillInput(page.passwordCreate.name, resourceMeta.name);
|
|
138
145
|
page.passwordCreate.fillInput(page.passwordCreate.uri, resourceMeta.uri);
|
|
139
146
|
page.passwordCreate.fillInput(page.passwordCreate.username, resourceMeta.username);
|
|
140
|
-
page.passwordCreate.
|
|
147
|
+
await page.passwordCreate.fillInputPassword(resourceMeta.password);
|
|
148
|
+
|
|
141
149
|
expect(page.passwordCreate.complexityText.textContent).not.toBe("Complexity: n/aEntropy: NaN bits");
|
|
142
150
|
expect(page.passwordCreate.progressBar.classList.contains("not_available")).toBe(false);
|
|
143
151
|
page.passwordCreate.fillInput(page.passwordCreate.description, resourceMeta.description);
|
|
@@ -180,7 +188,7 @@ describe("See the Create Resource", () => {
|
|
|
180
188
|
page.passwordCreate.fillInput(page.passwordCreate.name, resourceMeta.name);
|
|
181
189
|
page.passwordCreate.fillInput(page.passwordCreate.uri, resourceMeta.uri);
|
|
182
190
|
page.passwordCreate.fillInput(page.passwordCreate.username, resourceMeta.username);
|
|
183
|
-
page.passwordCreate.
|
|
191
|
+
await page.passwordCreate.fillInputPassword(resourceMeta.password);
|
|
184
192
|
expect(page.passwordCreate.complexityText.textContent).not.toBe("Complexity: n/aEntropy: NaN bits");
|
|
185
193
|
expect(page.passwordCreate.progressBar.classList.contains("not_available")).toBe(false);
|
|
186
194
|
page.passwordCreate.fillInput(page.passwordCreate.description, resourceMeta.description);
|
|
@@ -235,7 +243,7 @@ describe("See the Create Resource", () => {
|
|
|
235
243
|
}));
|
|
236
244
|
|
|
237
245
|
page.passwordCreate.fillInput(page.passwordCreate.name, "name");
|
|
238
|
-
page.passwordCreate.
|
|
246
|
+
await page.passwordCreate.fillInputPassword("password");
|
|
239
247
|
|
|
240
248
|
// Mock the request function to make it the expected result
|
|
241
249
|
mockContextRequest(requestMockImpl);
|
|
@@ -271,7 +279,7 @@ describe("See the Create Resource", () => {
|
|
|
271
279
|
expect.assertions(1);
|
|
272
280
|
// Mock the request function to make it return an error.
|
|
273
281
|
page.passwordCreate.fillInput(page.passwordCreate.name, "name");
|
|
274
|
-
page.passwordCreate.
|
|
282
|
+
await page.passwordCreate.fillInputPassword("password");
|
|
275
283
|
|
|
276
284
|
const error = new PassboltApiFetchError("Jest simulate API error.");
|
|
277
285
|
jest.spyOn(context.port, 'request').mockImplementationOnce(() => {
|
|
@@ -298,14 +306,40 @@ describe("See the Create Resource", () => {
|
|
|
298
306
|
expect(page.passwordCreate.passwordGeneratorDialog).not.toBeNull();
|
|
299
307
|
});
|
|
300
308
|
|
|
301
|
-
it("As a user I should see a feedback when the password or
|
|
302
|
-
expect.assertions(
|
|
309
|
+
it("As a user I should see a feedback when the password, descriptions, name, username or uri fields content is truncated by a field limit", async() => {
|
|
310
|
+
expect.assertions(5);
|
|
303
311
|
page.passwordCreate.fillInput(page.passwordCreate.password, 'a'.repeat(4097));
|
|
304
312
|
page.passwordCreate.fillInput(page.passwordCreate.description, 'a'.repeat(10000));
|
|
305
|
-
page.passwordCreate.
|
|
306
|
-
page.passwordCreate.
|
|
313
|
+
page.passwordCreate.fillInput(page.passwordCreate.name, 'a'.repeat(256));
|
|
314
|
+
page.passwordCreate.fillInput(page.passwordCreate.username, 'a'.repeat(255));
|
|
315
|
+
page.passwordCreate.fillInput(page.passwordCreate.uri, 'a'.repeat(1025));
|
|
316
|
+
|
|
317
|
+
await page.passwordCreate.keyUpInput(page.passwordCreate.password);
|
|
318
|
+
await page.passwordCreate.keyUpInput(page.passwordCreate.description);
|
|
319
|
+
await page.passwordCreate.keyUpInput(page.passwordCreate.username);
|
|
320
|
+
await page.passwordCreate.keyUpInput(page.passwordCreate.name);
|
|
321
|
+
await page.passwordCreate.keyUpInput(page.passwordCreate.uri);
|
|
322
|
+
|
|
307
323
|
expect(page.passwordCreate.passwordWarningMessage.textContent).toEqual(truncatedWarningMessage);
|
|
308
324
|
expect(page.passwordCreate.descriptionWarningMessage.textContent).toEqual(truncatedWarningMessage);
|
|
325
|
+
expect(page.passwordCreate.nameWarningMessage.textContent).toEqual(truncatedWarningMessage);
|
|
326
|
+
expect(page.passwordCreate.uriWarningMessage.textContent).toEqual(truncatedWarningMessage);
|
|
327
|
+
expect(page.passwordCreate.usernameWarningMessage.textContent).toEqual(truncatedWarningMessage);
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
it("As a signed-in user creating a password on the application, I should get warn when I enter a pwned password and not be blocked", async() => {
|
|
331
|
+
expect.assertions(2);
|
|
332
|
+
|
|
333
|
+
mockContextRequest(() => Promise.resolve(2));
|
|
334
|
+
await page.passwordCreate.fillInputPassword('hello-world');
|
|
335
|
+
// we expect a warning to inform about powned password
|
|
336
|
+
await waitFor(() => {});
|
|
337
|
+
expect(page.passwordCreate.pwnedWarningMessage.textContent).toEqual("The password is part of an exposed data breach.");
|
|
338
|
+
mockContextRequest(() => Promise.reject());
|
|
339
|
+
await page.passwordCreate.fillInputPassword('another test');
|
|
340
|
+
// we expect a warning to inform about a network issue
|
|
341
|
+
await waitFor(() => {});
|
|
342
|
+
expect(page.passwordCreate.pwnedWarningMessage.textContent).toEqual("The pwnedpasswords service is unavailable, your password might be part of an exposed data breach");
|
|
309
343
|
});
|
|
310
344
|
});
|
|
311
345
|
});
|
|
@@ -20,7 +20,6 @@ import DialogContextProvider from "../../../contexts/DialogContext";
|
|
|
20
20
|
import {MemoryRouter} from "react-router-dom";
|
|
21
21
|
import MockTranslationProvider from "../../../test/mock/components/Internationalisation/MockTranslationProvider";
|
|
22
22
|
import CreateResource from "./CreateResource";
|
|
23
|
-
|
|
24
23
|
/**
|
|
25
24
|
* The PasswordCreateDialog component represented as a page
|
|
26
25
|
*/
|
|
@@ -136,6 +135,13 @@ class PasswordCreatePageObject {
|
|
|
136
135
|
return this._container.querySelector('.name.error-message');
|
|
137
136
|
}
|
|
138
137
|
|
|
138
|
+
/**
|
|
139
|
+
* Returns the name warning mesage input element
|
|
140
|
+
*/
|
|
141
|
+
get nameWarningMessage() {
|
|
142
|
+
return this._container.querySelector('.name.warning-message');
|
|
143
|
+
}
|
|
144
|
+
|
|
139
145
|
/**
|
|
140
146
|
* Returns the uri input element
|
|
141
147
|
*/
|
|
@@ -143,6 +149,13 @@ class PasswordCreatePageObject {
|
|
|
143
149
|
return this._container.querySelector('#create-password-form-uri');
|
|
144
150
|
}
|
|
145
151
|
|
|
152
|
+
/**
|
|
153
|
+
* Returns the uri warning mesage input element
|
|
154
|
+
*/
|
|
155
|
+
get uriWarningMessage() {
|
|
156
|
+
return this._container.querySelector('.uri.warning-message');
|
|
157
|
+
}
|
|
158
|
+
|
|
146
159
|
/**
|
|
147
160
|
* Returns the username / email input element
|
|
148
161
|
*/
|
|
@@ -150,6 +163,13 @@ class PasswordCreatePageObject {
|
|
|
150
163
|
return this._container.querySelector('#create-password-form-username');
|
|
151
164
|
}
|
|
152
165
|
|
|
166
|
+
/**
|
|
167
|
+
* Returns the username warning mesage input element
|
|
168
|
+
*/
|
|
169
|
+
get usernameWarningMessage() {
|
|
170
|
+
return this._container.querySelector('.username.warning-message');
|
|
171
|
+
}
|
|
172
|
+
|
|
153
173
|
/**
|
|
154
174
|
* Returns the password input element
|
|
155
175
|
*/
|
|
@@ -171,6 +191,13 @@ class PasswordCreatePageObject {
|
|
|
171
191
|
return this._container.querySelector('.password.warning-message');
|
|
172
192
|
}
|
|
173
193
|
|
|
194
|
+
/**
|
|
195
|
+
* Returns the pwned warning message
|
|
196
|
+
*/
|
|
197
|
+
get pwnedWarningMessage() {
|
|
198
|
+
return this._container.querySelector('.pwned-password.warning-message');
|
|
199
|
+
}
|
|
200
|
+
|
|
174
201
|
/**
|
|
175
202
|
* Returns the complexity text input element
|
|
176
203
|
*/
|
|
@@ -228,8 +255,6 @@ class PasswordCreatePageObject {
|
|
|
228
255
|
return this._container.querySelector('.password-generator');
|
|
229
256
|
}
|
|
230
257
|
|
|
231
|
-
|
|
232
|
-
|
|
233
258
|
/**
|
|
234
259
|
* Returns the save button element
|
|
235
260
|
*/
|
|
@@ -237,8 +262,6 @@ class PasswordCreatePageObject {
|
|
|
237
262
|
return this._container.querySelector('.submit-wrapper button[type=\"submit\"]');
|
|
238
263
|
}
|
|
239
264
|
|
|
240
|
-
|
|
241
|
-
|
|
242
265
|
/**
|
|
243
266
|
* Returns the cancel button element
|
|
244
267
|
*/
|
|
@@ -254,8 +277,6 @@ class PasswordCreatePageObject {
|
|
|
254
277
|
return this._container.querySelector('.error-dialog .dialog .dialog-content .form-content');
|
|
255
278
|
}
|
|
256
279
|
|
|
257
|
-
|
|
258
|
-
|
|
259
280
|
/**
|
|
260
281
|
* Returns true if the page object exists in the container
|
|
261
282
|
*/
|
|
@@ -289,6 +310,13 @@ class PasswordCreatePageObject {
|
|
|
289
310
|
fireEvent.change(element, dataInputEvent);
|
|
290
311
|
}
|
|
291
312
|
|
|
313
|
+
/** fill the input password with data */
|
|
314
|
+
async fillInputPassword(data) {
|
|
315
|
+
const dataInputEvent = {target: {value: data}};
|
|
316
|
+
fireEvent.change(this.password, dataInputEvent);
|
|
317
|
+
jest.runAllTimers();
|
|
318
|
+
}
|
|
319
|
+
|
|
292
320
|
/** focus the input element with data */
|
|
293
321
|
focusInput(element) {
|
|
294
322
|
fireEvent.focus(element);
|
package/src/react-extension/components/Resource/DisplayResourcesList/DisplayResourcesList.js
CHANGED
|
@@ -31,6 +31,7 @@ import {Trans, withTranslation} from "react-i18next";
|
|
|
31
31
|
import {DateTime} from "luxon";
|
|
32
32
|
import {withDrag} from "../../../contexts/DragContext";
|
|
33
33
|
import DisplayDragResource from "./DisplayDragResource";
|
|
34
|
+
import ClipBoard from '../../../../shared/lib/Browser/clipBoard';
|
|
34
35
|
|
|
35
36
|
/**
|
|
36
37
|
* This component allows to display the filtered resources into a grid
|
|
@@ -221,8 +222,7 @@ class DisplayResourcesList extends React.Component {
|
|
|
221
222
|
async handleCopyUsernameClick(ev, resource) {
|
|
222
223
|
// Avoid the grid to select the resource while copying a resource username.
|
|
223
224
|
ev.stopPropagation();
|
|
224
|
-
|
|
225
|
-
await navigator.clipboard.writeText(resource.username);
|
|
225
|
+
await ClipBoard.copy(resource.username, this.props.context.port);
|
|
226
226
|
this.props.actionFeedbackContext.displaySuccess(this.translate("The username has been copied to clipboard"));
|
|
227
227
|
}
|
|
228
228
|
|
|
@@ -288,7 +288,7 @@ class DisplayResourcesList extends React.Component {
|
|
|
288
288
|
return;
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
|
-
await
|
|
291
|
+
await ClipBoard.copy(password, this.props.context.port);
|
|
292
292
|
await this.props.resourceWorkspaceContext.onResourceCopied();
|
|
293
293
|
await this.props.actionFeedbackContext.displaySuccess(this.translate("The secret has been copied to clipboard"));
|
|
294
294
|
}
|
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
} from "../../../contexts/ResourceWorkspaceContext";
|
|
27
27
|
import sanitizeUrl, {urlProtocols} from "../../../lib/Sanitize/sanitizeUrl";
|
|
28
28
|
import {Trans, withTranslation} from "react-i18next";
|
|
29
|
+
import ClipBoard from '../../../../shared/lib/Browser/clipBoard';
|
|
29
30
|
|
|
30
31
|
class DisplayResourcesListContextualMenu extends React.Component {
|
|
31
32
|
/**
|
|
@@ -77,7 +78,7 @@ class DisplayResourcesListContextualMenu extends React.Component {
|
|
|
77
78
|
* handle username resource
|
|
78
79
|
*/
|
|
79
80
|
async handleUsernameClickEvent() {
|
|
80
|
-
await
|
|
81
|
+
await ClipBoard.copy(this.resource.username, this.props.context.port);
|
|
81
82
|
this.props.actionFeedbackContext.displaySuccess(this.translate("The username has been copied to clipboard"));
|
|
82
83
|
this.props.hide();
|
|
83
84
|
}
|
|
@@ -86,7 +87,7 @@ class DisplayResourcesListContextualMenu extends React.Component {
|
|
|
86
87
|
* handle uri resource
|
|
87
88
|
*/
|
|
88
89
|
async handleUriClickEvent() {
|
|
89
|
-
await
|
|
90
|
+
await ClipBoard.copy(this.resource.uri, this.props.context.port);
|
|
90
91
|
this.props.actionFeedbackContext.displaySuccess(this.translate("The uri has been copied to clipboard"));
|
|
91
92
|
this.props.hide();
|
|
92
93
|
}
|
|
@@ -97,7 +98,7 @@ class DisplayResourcesListContextualMenu extends React.Component {
|
|
|
97
98
|
async handlePermalinkClickEvent() {
|
|
98
99
|
const baseUrl = this.props.context.userSettings.getTrustedDomain();
|
|
99
100
|
const permalink = `${baseUrl}/app/passwords/view/${this.resource.id}`;
|
|
100
|
-
await
|
|
101
|
+
await ClipBoard.copy(permalink, this.props.context.port);
|
|
101
102
|
this.props.actionFeedbackContext.displaySuccess(this.translate("The permalink has been copied to clipboard"));
|
|
102
103
|
this.props.hide();
|
|
103
104
|
}
|
|
@@ -114,11 +115,11 @@ class DisplayResourcesListContextualMenu extends React.Component {
|
|
|
114
115
|
throw new TypeError(this.translate("The password is empty."));
|
|
115
116
|
}
|
|
116
117
|
if (typeof plaintextDto === 'string') {
|
|
117
|
-
await
|
|
118
|
+
await ClipBoard.copy(plaintextDto, this.props.context.port);
|
|
118
119
|
this.props.resourceWorkspaceContext.onResourceCopied();
|
|
119
120
|
} else {
|
|
120
121
|
if (Object.prototype.hasOwnProperty.call(plaintextDto, 'password')) {
|
|
121
|
-
await
|
|
122
|
+
await ClipBoard.copy(plaintextDto.password, this.props.context.port);
|
|
122
123
|
this.props.resourceWorkspaceContext.onResourceCopied();
|
|
123
124
|
} else {
|
|
124
125
|
throw new TypeError(this.translate("The password field is not defined."));
|
|
@@ -24,6 +24,7 @@ import EditResource from "../EditResource/EditResource";
|
|
|
24
24
|
import ShareDialog from "../../Share/ShareDialog";
|
|
25
25
|
import ExportResources from "../ExportResources/ExportResources";
|
|
26
26
|
import {Trans, withTranslation} from "react-i18next";
|
|
27
|
+
import ClipBoard from '../../../../shared/lib/Browser/clipBoard';
|
|
27
28
|
|
|
28
29
|
/**
|
|
29
30
|
* This component allows the current user to add a new comment on a resource
|
|
@@ -165,7 +166,7 @@ class DisplayResourcesWorkspaceMenu extends React.Component {
|
|
|
165
166
|
this.handleCloseMoreMenu();
|
|
166
167
|
const baseUrl = this.props.context.userSettings.getTrustedDomain();
|
|
167
168
|
const permalink = `${baseUrl}/app/passwords/view/${this.selectedResources[0].id}`;
|
|
168
|
-
await
|
|
169
|
+
await ClipBoard.copy(permalink, this.props.context.port);
|
|
169
170
|
this.displaySuccessNotification(this.translate("The permalink has been copied to clipboard"));
|
|
170
171
|
}
|
|
171
172
|
|
|
@@ -174,7 +175,7 @@ class DisplayResourcesWorkspaceMenu extends React.Component {
|
|
|
174
175
|
*/
|
|
175
176
|
async handleCopyUsernameClickEvent() {
|
|
176
177
|
this.handleCloseMoreMenu();
|
|
177
|
-
await
|
|
178
|
+
await ClipBoard.copy(this.selectedResources[0].username, this.props.context.port);
|
|
178
179
|
this.displaySuccessNotification(this.translate("The username has been copied to clipboard"));
|
|
179
180
|
}
|
|
180
181
|
|
|
@@ -190,10 +191,10 @@ class DisplayResourcesWorkspaceMenu extends React.Component {
|
|
|
190
191
|
throw new TypeError(this.translate("The password is empty."));
|
|
191
192
|
}
|
|
192
193
|
if (typeof plaintextDto === 'string') {
|
|
193
|
-
await
|
|
194
|
+
await ClipBoard.copy(plaintextDto, this.props.context.port);
|
|
194
195
|
} else {
|
|
195
196
|
if (Object.prototype.hasOwnProperty.call(plaintextDto, 'password')) {
|
|
196
|
-
await
|
|
197
|
+
await ClipBoard.copy(plaintextDto.password, this.props.context.port);
|
|
197
198
|
} else {
|
|
198
199
|
throw new TypeError(this.translate("The password field is not defined."));
|
|
199
200
|
}
|