passbolt-browser-extension 5.6.0 → 5.8.0

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.
Files changed (223) hide show
  1. package/CHANGELOG.md +125 -1
  2. package/RELEASE_NOTES.md +86 -54
  3. package/doc/browser-extension-class-diagram.md +74 -0
  4. package/eslint.config.mjs +224 -0
  5. package/package.json +19 -15
  6. package/src/all/_locales/locales.test.js +2 -0
  7. package/src/all/background_page/controller/account/updatePrivateKeyController.test.js +1 -1
  8. package/src/all/background_page/controller/app/appInitController.js +1 -0
  9. package/src/all/background_page/controller/auth/authVerifyServerKeyController.js +2 -0
  10. package/src/all/background_page/controller/autofill/AutofillController.test.js +1 -1
  11. package/src/all/background_page/controller/crypto/downloadUserPrivateKeyController.js +2 -1
  12. package/src/all/background_page/controller/crypto/getUserKeyInfoController.js +2 -1
  13. package/src/all/background_page/controller/extension/onExtensionInstalledController.js +2 -0
  14. package/src/all/background_page/controller/favorite/favoriteResourceController.js +57 -0
  15. package/src/all/background_page/controller/favorite/favoriteResourceController.test.js +47 -0
  16. package/src/all/background_page/controller/favorite/unfavoriteResourceController.js +57 -0
  17. package/src/all/background_page/controller/favorite/unfavoriteResourceController.test.js +41 -0
  18. package/src/all/background_page/controller/group/{findGroupsCurrentUserIsMemberOfController.js → findMyGroupsController.js} +6 -10
  19. package/src/all/background_page/controller/group/{findGroupsCurrentUserIsMemberOfController.test.js → findMyGroupsController.test.js} +20 -13
  20. package/src/all/background_page/controller/group/groupUpdateController.test.js +8 -4
  21. package/src/all/background_page/controller/group/updateAllGroupsLocalStorageController.js +54 -0
  22. package/src/all/background_page/controller/group/updateAllGroupsLocalStorageController.test.js +47 -0
  23. package/src/all/background_page/controller/import/importResourcesFileController.test.js +48 -10
  24. package/src/all/background_page/controller/move/moveResourcesController.js +1 -1
  25. package/src/all/background_page/controller/passwordExpiry/getOrFindPasswordExpirySettingsController.test.js +152 -75
  26. package/src/all/background_page/controller/passwordExpiry/savePasswordExpirySettingsController.test.js +5 -9
  27. package/src/all/background_page/controller/port/removePortController.js +1 -0
  28. package/src/all/background_page/controller/rbac/{findMeController.js → findRbacMeController.js} +4 -6
  29. package/src/all/background_page/controller/rbac/{findMeController.test.js → findRbacMeController.test.js} +4 -4
  30. package/src/all/background_page/controller/resource/resourceDeleteController.js +1 -1
  31. package/src/all/background_page/controller/resource/resourceUpdateController.test.js +2 -0
  32. package/src/all/background_page/controller/role/findAllRoleControler.js +51 -0
  33. package/src/all/background_page/controller/role/findAllRoleControler.test.js +53 -0
  34. package/src/all/background_page/controller/role/rolesUpdateLocalStorageController.js +51 -0
  35. package/src/all/background_page/controller/role/rolesUpdateLocalStorageController.test.js +94 -0
  36. package/src/all/background_page/controller/secretRevision/deleteSecretRevisionsSettingsController.js +51 -0
  37. package/src/all/background_page/controller/secretRevision/deleteSecretRevisionsSettingsController.test.js +47 -0
  38. package/src/all/background_page/controller/secretRevision/findResourceSecretRevisionsForDisplayController.js +57 -0
  39. package/src/all/background_page/controller/secretRevision/findResourceSecretRevisionsForDisplayController.test.js +85 -0
  40. package/src/all/background_page/controller/secretRevision/findSecretRevisionsSettingsController.js +51 -0
  41. package/src/all/background_page/controller/secretRevision/findSecretRevisionsSettingsController.test.js +50 -0
  42. package/src/all/background_page/controller/secretRevision/saveSecretRevisionsSettingsController.js +54 -0
  43. package/src/all/background_page/controller/secretRevision/saveSecretRevisionsSettingsController.test.js +66 -0
  44. package/src/all/background_page/event/appEvents.js +88 -2
  45. package/src/all/background_page/event/groupEvents.js +8 -31
  46. package/src/all/background_page/event/informMenuEvents.js +12 -0
  47. package/src/all/background_page/event/quickAccessEvents.js +2 -2
  48. package/src/all/background_page/event/roleEvents.js +18 -9
  49. package/src/all/background_page/index.js +1 -0
  50. package/src/all/background_page/model/entity/account/accountEntity.test.js +2 -1
  51. package/src/all/background_page/model/entity/folder/foldersCollection.js +2 -1
  52. package/src/all/background_page/model/entity/import/importResourcesFileEntity.js +27 -0
  53. package/src/all/background_page/model/entity/import/importResourcesFileEntity.test.js +68 -1
  54. package/src/all/background_page/model/entity/organizationSettings/organizationSettingsEntity.test.data.js +9 -1
  55. package/src/all/background_page/model/entity/permission/permissionsCollection.js +8 -0
  56. package/src/all/background_page/model/entity/permission/permissionsCollection.test.js +24 -0
  57. package/src/all/background_page/model/entity/resource/resourceEntity.js +10 -1
  58. package/src/all/background_page/model/entity/resource/resourceEntity.test.js +99 -0
  59. package/src/all/background_page/model/entity/resource/resourcesCollection.js +19 -0
  60. package/src/all/background_page/model/entity/resource/resourcesCollection.test.js +103 -3
  61. package/src/all/background_page/model/entity/secret/groupUpdate/groupUpdateSecretsCollection.js +1 -1
  62. package/src/all/background_page/model/entity/secret/groupUpdate/groupUpdateSecretsCollection.test.js +1 -1
  63. package/src/all/background_page/model/entity/secret/resource/resourceSecretsCollection.js +1 -1
  64. package/src/all/background_page/model/entity/secret/resource/resourceSecretsCollection.test.js +1 -1
  65. package/src/all/background_page/model/entity/sso/ssoLoginUrlEntity.js +1 -0
  66. package/src/all/background_page/model/entity/theme/themeEntity.js +4 -31
  67. package/src/all/background_page/model/entity/theme/themeEntity.test.data.js +38 -0
  68. package/src/all/background_page/model/entity/theme/themeEntity.test.js +31 -16
  69. package/src/all/background_page/model/entity/theme/themesCollection.js +41 -89
  70. package/src/all/background_page/model/entity/theme/themesCollection.test.data.js +22 -0
  71. package/src/all/background_page/model/entity/theme/themesCollection.test.js +103 -0
  72. package/src/all/background_page/model/group/groupModel.js +14 -39
  73. package/src/all/background_page/model/import/resources/csvRowParser/csv1PasswordRowParser.js +2 -2
  74. package/src/all/background_page/model/import/resources/csvRowParser/csvBitWardenRowParser.js +2 -2
  75. package/src/all/background_page/model/import/resources/csvRowParser/csvChromiumRowParser.js +2 -2
  76. package/src/all/background_page/model/import/resources/csvRowParser/csvDashlaneRowParser.js +2 -2
  77. package/src/all/background_page/model/import/resources/csvRowParser/csvKdbxRowParser.js +2 -2
  78. package/src/all/background_page/model/import/resources/csvRowParser/csvLastPassRowParser.js +2 -2
  79. package/src/all/background_page/model/import/resources/csvRowParser/csvLogMeOnceRowParser.js +2 -2
  80. package/src/all/background_page/model/import/resources/csvRowParser/csvMozillaPlatformRowParser.js +2 -2
  81. package/src/all/background_page/model/import/resources/csvRowParser/csvNordpassRowParser.js +2 -2
  82. package/src/all/background_page/model/import/resources/csvRowParser/csvSafariRowParser.js +2 -2
  83. package/src/all/background_page/model/import/resources/kdbx/kdbx-expiry.kdbx +0 -0
  84. package/src/all/background_page/model/import/resources/kdbx/kdbx-never-expiry.kdbx +0 -0
  85. package/src/all/background_page/model/import/resources/resourcesCsvImportParser.js +2 -0
  86. package/src/all/background_page/model/import/resources/resourcesCsvImportParser.test.js +10 -8
  87. package/src/all/background_page/model/import/resources/resourcesKdbxImportParser.js +5 -3
  88. package/src/all/background_page/model/import/resources/resourcesKdbxImportParser.test.js +7 -4
  89. package/src/all/background_page/model/passwordPolicies/passwordPoliciesModel.test.js +1 -1
  90. package/src/all/background_page/model/resource/resourceModel.js +0 -15
  91. package/src/all/background_page/model/theme/themeModel.test.js +73 -0
  92. package/src/all/background_page/model/user.js +6 -3
  93. package/src/all/background_page/model/userSettings/userSettings.js +11 -2
  94. package/src/all/background_page/model/userSettings/userSettings.test.js +51 -0
  95. package/src/all/background_page/pagemod/appBootstrapPagemod.js +1 -2
  96. package/src/all/background_page/pagemod/appBootstrapPagemod.test.js +2 -5
  97. package/src/all/background_page/pagemod/appPagemod.js +0 -2
  98. package/src/all/background_page/pagemod/appPagemod.test.js +1 -5
  99. package/src/all/background_page/sdk/i18n.js +48 -4
  100. package/src/all/background_page/sdk/port.test.js +1 -0
  101. package/src/all/background_page/service/accountRecovery/decryptPrivateKeyPasswordDataService.js +1 -0
  102. package/src/all/background_page/service/accountRecovery/decryptResponseDataService.js +1 -0
  103. package/src/all/background_page/service/accountRecovery/parseAccountRecoveryUrlService.js +2 -0
  104. package/src/all/background_page/service/api/accountSettings/accountSettingsService.js +0 -12
  105. package/src/all/background_page/service/api/accountSettings/accountSettingsService.test.data.js +35 -0
  106. package/src/all/background_page/service/api/accountSettings/accountSettingsService.test.js +65 -0
  107. package/src/all/background_page/service/api/actionLog/actionLogApiService.js +1 -1
  108. package/src/all/background_page/service/api/comment/commentApiService.js +1 -1
  109. package/src/all/background_page/service/api/favorite/{favoriteService.js → favoriteApiService.js} +6 -6
  110. package/src/all/background_page/service/api/favorite/favoriteApiService.test.js +138 -0
  111. package/src/all/background_page/service/api/group/{groupService.js → groupApiService.js} +8 -8
  112. package/src/all/background_page/service/api/group/{groupService.test.js → groupApiService.test.js} +4 -4
  113. package/src/all/background_page/service/api/secretRevision/resourceSecretRevisionApiService.js +82 -0
  114. package/src/all/background_page/service/api/secretRevision/resourceSecretRevisionApiService.test.js +158 -0
  115. package/src/all/background_page/service/api/secretRevision/secretRevisionsSettingsApiService.js +77 -0
  116. package/src/all/background_page/service/api/secretRevision/secretRevisionsSettingsApiService.test.js +143 -0
  117. package/src/all/background_page/service/app/parseAppUrlService.js +2 -0
  118. package/src/all/background_page/service/authenticationStatusService.js +1 -0
  119. package/src/all/background_page/service/crypto/decryptPrivateKeyService.js +1 -0
  120. package/src/all/background_page/service/crypto/decryptSecretsService.js +136 -0
  121. package/src/all/background_page/service/crypto/decryptSecretsService.test.js +110 -0
  122. package/src/all/background_page/{model/favorite/favoriteModel.js → service/favorite/favoriteResourceService.js} +35 -12
  123. package/src/all/background_page/service/favorite/favoriteResourceService.test.js +144 -0
  124. package/src/all/background_page/service/group/findAndUpdateGroupsLocalStorageService.js +65 -0
  125. package/src/all/background_page/service/group/findAndUpdateGroupsLocalStorageService.test.js +113 -0
  126. package/src/all/background_page/service/group/findGroupsService.js +77 -0
  127. package/src/all/background_page/service/group/findGroupsService.test.data.js +27 -0
  128. package/src/all/background_page/service/group/findGroupsService.test.js +140 -0
  129. package/src/all/background_page/service/group/groupUpdateService.js +7 -6
  130. package/src/all/background_page/service/group/groupUpdateService.test.js +21 -21
  131. package/src/all/background_page/service/localStorage/localStorageService.js +1 -1
  132. package/src/all/background_page/service/localStorage/localStorageService.test.js +16 -3
  133. package/src/all/background_page/service/local_storage/groupLocalStorage.js +140 -76
  134. package/src/all/background_page/service/local_storage/groupLocalStorage.test.js +339 -0
  135. package/src/all/background_page/service/local_storage/rolesLocalStorage.js +2 -2
  136. package/src/all/background_page/service/metadata/encryptMetadataService.js +1 -0
  137. package/src/all/background_page/service/permission/findPermissionsService.js +15 -0
  138. package/src/all/background_page/service/permission/findPermissionsService.test.js +52 -8
  139. package/src/all/background_page/service/rbac/findAndUpdateRbacsLocalStorageService.js +58 -0
  140. package/src/all/background_page/service/rbac/findRbacService.js +37 -0
  141. package/src/all/background_page/service/rbac/findRbacService.test.js +61 -0
  142. package/src/all/background_page/service/rbac/getOrFindRbacService.js +44 -0
  143. package/src/all/background_page/service/recover/parseRecoverUrlService.js +2 -0
  144. package/src/all/background_page/service/resource/import/ImportResourcesService.js +31 -2
  145. package/src/all/background_page/service/resource/import/ImportResourcesService.test.js +199 -21
  146. package/src/all/background_page/service/resource/update/resourceUpdateService.js +8 -4
  147. package/src/all/background_page/service/resource/update/resourceUpdateService.test.js +51 -0
  148. package/src/all/background_page/service/role/findAndUpdateRolesLocalStorageService.js +57 -0
  149. package/src/all/background_page/service/role/findAndUpdateRolesLocalStorageService.test.js +70 -0
  150. package/src/all/background_page/service/role/findRolesService.js +45 -0
  151. package/src/all/background_page/service/role/findRolesService.test.js +105 -0
  152. package/src/all/background_page/service/role/getOrFindRolesService.js +50 -0
  153. package/src/all/background_page/service/role/getOrFindRolesService.test.js +64 -0
  154. package/src/all/background_page/service/secret/decryptAndParseResourceSecretService.test.js +1 -1
  155. package/src/all/background_page/service/secret/findSecretService.js +1 -1
  156. package/src/all/background_page/service/secret/pownedService.js +2 -1
  157. package/src/all/background_page/service/secretRevisions/deleteSecretRevisionsSettingsService.js +33 -0
  158. package/src/all/background_page/service/secretRevisions/deleteSecretRevisionsSettingsService.test.js +47 -0
  159. package/src/all/background_page/service/secretRevisions/findAndDecryptSecretRevisionsService.js +63 -0
  160. package/src/all/background_page/service/secretRevisions/findAndDecryptSecretRevisionsService.test.js +143 -0
  161. package/src/all/background_page/service/secretRevisions/findSecretRevisionsService.js +41 -0
  162. package/src/all/background_page/service/secretRevisions/findSecretRevisionsService.test.js +100 -0
  163. package/src/all/background_page/service/secretRevisions/findSecretRevisionsSettingsService.js +41 -0
  164. package/src/all/background_page/service/secretRevisions/findSecretRevisionsSettingsService.test.js +52 -0
  165. package/src/all/background_page/service/secretRevisions/saveSecretRevisionsSettingsService.js +38 -0
  166. package/src/all/background_page/service/secretRevisions/saveSecretRevisionsSettingsService.test.js +58 -0
  167. package/src/all/background_page/service/setup/parseSetupUrlService.js +2 -0
  168. package/src/all/background_page/service/share/shareFoldersService.test.js +3 -3
  169. package/src/all/background_page/service/share/shareResourceService.js +1 -1
  170. package/src/all/background_page/service/toolbar/toolbarService.js +1 -0
  171. package/src/all/background_page/service/webIntegration/parseWebIntegrationUrlService.js +1 -0
  172. package/src/all/background_page/utils/openpgp/openpgpAssertions.js +3 -0
  173. package/src/all/background_page/utils/promise/promiseTimeoutService.test.js +1 -0
  174. package/src/all/contentScripts/js/app/AccountRecovery.js +2 -0
  175. package/src/all/contentScripts/js/app/App.js +3 -0
  176. package/src/all/contentScripts/js/app/Login.js +4 -0
  177. package/src/all/contentScripts/js/app/Recover.js +4 -0
  178. package/src/all/contentScripts/js/app/Setup.js +3 -0
  179. package/src/all/locales/cs-CZ/common.json +13 -12
  180. package/src/all/locales/de-DE/common.json +13 -12
  181. package/src/all/locales/en-UK/common.json +1 -0
  182. package/src/all/locales/es-ES/common.json +13 -12
  183. package/src/all/locales/fr-FR/common.json +20 -19
  184. package/src/all/locales/it-IT/common.json +24 -23
  185. package/src/all/locales/ja-JP/common.json +24 -23
  186. package/src/all/locales/ko-KR/common.json +13 -12
  187. package/src/all/locales/lt-LT/common.json +24 -23
  188. package/src/all/locales/nl-NL/common.json +24 -23
  189. package/src/all/locales/pl-PL/common.json +18 -17
  190. package/src/all/locales/pt-BR/common.json +23 -22
  191. package/src/all/locales/ro-RO/common.json +24 -23
  192. package/src/all/locales/ru-RU/common.json +24 -23
  193. package/src/all/locales/sl-SI/common.json +19 -18
  194. package/src/all/locales/sv-SE/common.json +27 -26
  195. package/src/all/locales/uk-UA/common.json +19 -18
  196. package/src/all/webAccessibleResources/js/app/AccountRecovery.js +3 -0
  197. package/src/all/webAccessibleResources/js/app/App.js +3 -0
  198. package/src/all/webAccessibleResources/js/app/InFormCallToAction.js +3 -0
  199. package/src/all/webAccessibleResources/js/app/InFormMenu.js +2 -0
  200. package/src/all/webAccessibleResources/js/app/Login.js +3 -0
  201. package/src/all/webAccessibleResources/js/app/QuickAccess.js +3 -1
  202. package/src/all/webAccessibleResources/js/app/Recover.js +3 -0
  203. package/src/all/webAccessibleResources/js/app/Setup.js +3 -0
  204. package/src/all/webAccessibleResources/js/lib/port.test.js +1 -0
  205. package/src/chrome/manifest.json +1 -1
  206. package/src/chrome-mv3/manifest.json +1 -1
  207. package/src/chrome-mv3/serviceWorker/service/network/requestFetchOffscreenService.test.js +0 -1
  208. package/src/firefox/manifest.json +1 -1
  209. package/src/safari/manifest.json +1 -1
  210. package/test/jest.setup.js +2 -0
  211. package/.eslintrc.json +0 -231
  212. package/src/all/background_page/event/appBootstrapEvents.js +0 -39
  213. package/src/all/background_page/event/favoriteEvents.js +0 -47
  214. package/src/all/background_page/model/entity/secret/secretEntity.js +0 -134
  215. package/src/all/background_page/model/entity/secret/secretEntity.test.js +0 -149
  216. package/src/all/background_page/model/entity/secret/secretsCollection.js +0 -121
  217. package/src/all/background_page/model/entity/secret/secretsCollection.test.js +0 -135
  218. package/src/all/background_page/model/group/groupModel.test.js +0 -151
  219. package/src/all/background_page/model/rbac/RbacModel.js +0 -75
  220. package/src/all/background_page/model/role/roleModel.js +0 -56
  221. package/src/all/background_page/service/api/role/roleService.js +0 -54
  222. /package/.github/{ISSUE_TEMPLATE.md → ISSUE_TEMPLATE/bug_report.md} +0 -0
  223. /package/.github/{PULL_REQUEST_TEMPLATE.md → PULL_REQUEST_TEMPLATE/pull_request_template.md} +0 -0
package/CHANGELOG.md CHANGED
@@ -4,6 +4,128 @@ This project adheres to [Semantic Versioning](http://semver.org/).
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [5.8.0] - 2025-12-16
8
+ ### Added
9
+ - PB-46646 Reduce accidental destructive actions by moving Delete user and Disable MFA into a More menu in Users and groups
10
+ - PB-28298 Add users to groups by dragging and dropping
11
+ - PB-47198 Add exception to allow users to autofill workbench.cisecurity.org
12
+ - PB-46997 DR - WP1.1 Update RbacsCollection to EntityV2Collection and add new methods
13
+ - PB-46999 DR - WP1.2 Update RoleEntity schema and add new methods
14
+ - PB-47000 DR - WP1.3 Update RolesCollection to EntityV2Collection and add new methods
15
+ - PB-47002 DR - WP2.1 Update of RoleService to a RoleApiService
16
+ - PB-47003 DR - WP2.2 Update of RoleModel to a RoleService
17
+ - PB-47003 DR - WP2.3 Update of RbacService to a RbacApiService
18
+ - PB-47014 DR - WP2.4 Update of RbacModel to a RbacService
19
+ - PB-47015 DR - WP3.1 Create the FindAllRolesController and update the event
20
+ - PB-47015 DR - WP3.1 Create the FindAllRolesController and update the event
21
+ - PB-47017 DR - WP3.2 Update the FindMeController into a FindMeRbacController
22
+ - PB-47088 DR - WP3.3 Create the FindAndUpdateRolesLocalStorageController
23
+ - PB-47018 DR - WP4.1 Create RoleServiceWorkerService to get the roles
24
+ - PB-47019 DR - WP4.2 Create RbacServiceWorkerService to get the RBAC permissions of a signed-in user
25
+ - PB-47021 DR - WP4.3 Add the method canRoleUseAction in CanUseService
26
+ - PB-47089 DR - WP4.4 Add a method to find and update roles in local storage
27
+ - PB-47022 DR - WP5.1 Add the method canIUseAction in RbacContext
28
+ - PB-47023 DR - WP5.2 Verify the signed-in user's RBAC privileges before allowing access to the FilterUsersByGroup functionality
29
+ - PB-47024 DR - WP5.3 Verify the signed-in user's RBAC privileges before allowing access to the DisplayUserWorkspaceMainActions functionality
30
+
31
+ - PB-47023 DR - WP5.4 Verify the signed-in user's RBAC privileges before allowing access to the DisplayUserWorkspaceActions functionality
32
+ - PB-47036 DR - WP5.5 Verify the signed-in user's RBAC privileges before allowing access to the DisplayUsersWorkspaceFilterBar functionality
33
+ - PB-47037 DR - WP5.6 Verify the signed-in user's RBAC privileges before allowing access to the DisplayUsers functionality
34
+ - PB-47039 DR - WP5.7 Update CreateUser to select role in a dropdown component
35
+ - PB-47042 DR - WP5.8 Update EditUser to select role in a dropdown component
36
+ - PB-47027 DR - WP5.9 Create the component CreateRoleDialog
37
+ - PB-47028 DR - WP5.10 Create the component EditRoleDialog
38
+ - PB-47029 DR - WP5.11 Create the component DeleteRoleDialog
39
+ - PB-47030 DR - WP5.12 Update the style of DisplayRbacAdministration to match current design
40
+ - PB-47031 DR - WP5.13 Add create role in DisplayRbacAdministration
41
+ - PB-47032 DR - WP5.14 Display all roles in DisplayRbacAdministration
42
+ - PB-47033 DR - WP5.15 Add menu item to update the name of new role
43
+ - PB-47016 DR - WP5.16 Add menu item to delete new role
44
+ - PB-47090 DR - WP5.17 Update ManageAccountRecoveryUserSettings to use roles from context
45
+ - PB-47091 DR - WP5.18 Update ReviewAccountRecoveryRequest to use roles from context
46
+ - PB-47092 DR - WP5.19 Update DisplayScimSettingsAdministration to use roles from context
47
+ - PB-47093 DR - WP5.20 Update DisplayUserDetailsInformation to use roles from context
48
+ - PB-47094 DR - WP5.21 Update DisplayAccountRecoveryUserSettings to use roles from context
49
+ - PB-47095 DR - WP5.22 Update UserWorkspaceContext to use roles from context
50
+ - PB-47096 DR - WP5.23 Create the RoleContextProvider and add it on ExtAppContext
51
+ - PB-47214 DR - WP5.24 Update the RoleEntity to avoid name bypass
52
+ - PB-47215 DR - WP5.25 Update RolesCollection to filter out Guest role
53
+ - PB-47216 DR - WP5.26 Update FindRolesService to filter out guest role
54
+ - PB-47231 DR - WP5.27 Create component DeleteRoleNotAllowed
55
+
56
+ ### Fixed
57
+ - PB-46180 Incorrect folder name encoding in sharing progress dialog
58
+ - PB-46612 Add missing border radius to secret history selected revision
59
+ - PB-45978 Resize bar continues dragging after mouse release
60
+ - PB-46905 Display the "Remove from group" action button to group managers
61
+ - PB-46627 Fix missing space in the “Advanced settings” of the password generator tabs between the last component and the CTA
62
+ - PB-46930 Secret history review should display an unknown user when creator does not exists
63
+ - PB-47298 KDBX not set expiry if never is set
64
+
65
+ ### Maintenance
66
+ - PB-46636 Remove eslint v8 compatibility
67
+ - PB-46890 Small upgrade for js-yaml (Medium)
68
+ - PB-46831 Increase coverage of passbolt-styleguide DisplayUserTheme to 100%, and verify no change occurs when the user selects the already-selected theme
69
+ - PB-29338 React 18: upgrade changes with Legacy DOM renderer
70
+ - PB-47057 React 18: Remove unused dev dependency jest-dom
71
+ - PB-47069 DisplayResourceDetailsInformation Test Cases for Expired Passwords
72
+ - PB-46831 Increase coverage of passbolt-styleguide DisplayUserTheme to 100%
73
+ - PB-47069 DisplayResourceDetailsInformation Test Cases for Expired Passwords
74
+ - PB-47311 Major upgrade for serialize-javascript (Medium)
75
+ - PB-46832 Increase coverage of ThemeEntity
76
+ - PB-46833 Increase coverage of AccountSettingsService
77
+ - PB-46834 Increase coverage of ThemeModel
78
+ - PB-47011 ESLINT - WP1.1 Install phantom dependencies
79
+
80
+ ## [5.7.0] - 2025-11-12
81
+ ### Added
82
+ - PB-17712 Focus should be put in the passphrase field when importing keepass file protected by passphrase
83
+ - PB-33599 Allow users to access previous revisions of a resource’s secret
84
+ - PB-33599 Allow administrators to configure how many secret revisions are retained
85
+ - PB-44420 Allow administrators to download the Users Directory sync report for follow-up actions
86
+ - PB-44434 As an administrator I can see encrypted metadata healthchecks from the administration workspace
87
+ - PB-45249 Add “Attention required” filter in the “Users & groups” workspace to filter users by attention required
88
+ - PB-45842 Add link to SCIM admin guide in the product
89
+ - PB-46427 Add remove from group button in User & Group Workspace page
90
+
91
+ ### Fixed
92
+ - PB-18497 Add loading spinner when submitting imported GPG key during account extension association (activation/recover)
93
+ - PB-36183 Display UTC date in tooltip for relative “X days ago” timestamps
94
+ - PB-42032 Fix: update passphrase help section link goes to the former help site
95
+ - PB-43950 Add padding between fields and their description on the Users Directory administration page
96
+ - PB-44603 Help link in administration internationalization page should target the contribute page of the help site
97
+ - PB-44949 GITHUB#240 Inform menu crash on suggested resource icon
98
+ - PB-45263 Enforce password expiry on imported resources when a password policy requires it
99
+ - PB-45588 Extend metadata description textarea in resource creation dialog to use full available height
100
+ - PB-45699 User without groups is not display correctly on the right sidebar
101
+ - PB-45723 The in-form CTA is not visible since v5.5 for some web application
102
+ - PB-45797 Fix typos in BExt
103
+ - PB-45917 I can autofill my username in the login form of cryptpad in French
104
+ - PB-45992 Keep selection of resources when collapsing the Workspace section
105
+ - PB-46013 Empty Full Report textarea displayed in Users Directory dialogs when there are no resources to synchronize
106
+ - PB-46065 Prevent re-encryption of metadata with personal user key when a resource is shared with a group
107
+ - PB-46118 Import unexpected error handling on import
108
+ - PB-46191 Update UserSettings validateDomain to make sure the issue cannot be exploited
109
+ - PB-46372 As LU, I should see the content share dialog within the boundaries of the dialog
110
+ - PB-46385 Fix auto-fill on OVH with custom selector field on username
111
+
112
+ ### Maintenance
113
+ - PB-30373 Remove unused event passbolt.app-bootstrap.navigate-to-logout
114
+ - PB-45099 Update: Regular expression on private key metadata validation
115
+ - PB-45100 Update: Regular expression on GPG Message validation
116
+ - PB-45585 Fix SCIM styleguide related unit tests error
117
+ - PB-45589 Refactor resource favorite capability to use FavoriteServiceWorkerService instead of direct port requests
118
+ - PB-45590 Migrate favorite logic from FavoriteModel to FavoriteResourceService and remove legacy model
119
+ - PB-45591 Route passbolt.favorite.add/delete events through controllers instead of calling services directly
120
+ - PB-45593 Add test coverage for FavoriteService API and rename class to align with Passbolt standard
121
+ - PB-45678 Upgrade ESLint dependencies across both repositories
122
+ - PB-45835 Migrate group (partially) related code to new architecture
123
+ - PB-45894 Rename leftSideBar and rightSideBar classes to respect naming convention
124
+ - PB-45963 Replace find-all with find-my-groups Port Requests
125
+ - PB-45965 Rename groupService to groupApiService
126
+ - PB-46127 Update i18next dependency
127
+ - PB-46190 Update themeEntity to remove preview unused field
128
+
7
129
  ## [5.6.0] - 2025-10-08
8
130
  ### Added
9
131
  - PB-39068 WP5-5.6 - Implement a Service RotateResourcesMetadataKeyService that proceed with the rotation of the key
@@ -2442,7 +2564,9 @@ self registration settings option in the left-side bar
2442
2564
  - AP: User with plugin installed
2443
2565
  - LU: Logged in user
2444
2566
 
2445
- [Unreleased]: https://github.com/passbolt/passbolt_browser_extension/compare/v5.6.0...HEAD
2567
+ [Unreleased]: https://github.com/passbolt/passbolt_browser_extension/compare/v5.8.0...HEAD
2568
+ [5.8.0]: https://github.com/passbolt/passbolt_browser_extension/compare/v5.7.0...5.8.0
2569
+ [5.7.0]: https://github.com/passbolt/passbolt_browser_extension/compare/v5.6.0...5.7.0
2446
2570
  [5.6.0]: https://github.com/passbolt/passbolt_browser_extension/compare/v5.5.1...v5.6.0
2447
2571
  [5.5.1]: https://github.com/passbolt/passbolt_browser_extension/compare/v5.5.0...v5.5.1
2448
2572
  [5.5.0]: https://github.com/passbolt/passbolt_browser_extension/compare/v5.4.1...v5.5.0
package/RELEASE_NOTES.md CHANGED
@@ -1,70 +1,102 @@
1
- Release song: https://www.youtube.com/watch?v=bu50DtPF1Ac
1
+ Release song: https://www.youtube.com/watch?v=F5uXomY94w8
2
2
 
3
- Passbolt 5.6.0 introduces standalone notes, shared metadata key rotation, and resizable sidebars. As usual, this version also brings important security hardening through dependency updates as well as a series of bug fixes and maintenance improvements.
3
+ Passbolt 5.8.0 introduces dynamic role management, allowing organizations to define additional roles that better align with internal policies, compliance requirements, and operational needs. This release also adds drag & drop user assignment to groups, simplifying day-to-day user and group management.
4
4
 
5
- ## Standalone notes
5
+ **Warning**: Ensure that all users have updated their browser extension to at least version 5.8 before assigning new roles. Otherwise, they will not be able to connect to Passbolt.
6
6
 
7
- It is now possible to create notes as a standalone resource type, without attaching them to credentials or other elements. Import and export processes have been updated to recognize and support this new type. Any imported resources that contain only a description will now be created as standalone notes.
7
+ ## Dynamic role management
8
8
 
9
- ## Shared metadata key rotation
9
+ As was already the case with the default User role, Passbolt allows administrators to restrict what users can do by limiting access to specific capabilities. With version 5.8, this model is extended beyond the default Admin and User roles, making it possible to create additional roles and assign them to users for more granular control.Default roles cannot be modified or deleted, while newly created roles (up to two per instance) can copy permissions from existing roles and can be renamed or deleted.
10
10
 
11
- Administrators can now rotate the shared metadata key at any time from the organization settings. This improvement marks one of the final steps in meeting metadata encryption requirements. The rotation process can be performed while the instance remains operational, so availability is not disrupted.
11
+ Dynamic roles also enable the delegation of administrative responsibilities. Rather than granting full administrative access, administrators can now assign selected capabilities to custom roles and distribute operational tasks across multiple users. Initial support covers group creation, as well as handling account recovery requests in Passbolt Pro.
12
12
 
13
- ## Resizable sidebars
13
+ At this stage, dynamic role management comes with a defined scope and set of constraints.
14
14
 
15
- Both main workspace and Users & Groups workspace now feature sidebars that can be resized. This allows users to improve readability when working with long folder names or deeply nested folder structures. After resizing, a double-click on the sidebar handle resets it to its default width.
15
+ - The default Admin and User roles keep fixed names and cannot be renamed or deleted.
16
+ - As before, the User role can be restricted, but it cannot be assigned delegated administrative responsibilities.
17
+ - The Admin role, by contrast, always retains access to all capabilities and cannot be restricted.
18
+ - Custom roles are currently limited to two per instance and support a first set of administrative capabilities.
16
19
 
17
- ## Miscellaneous Improvements
20
+ This scope will be expanded progressively as additional needs and use cases are identified by the community.
18
21
 
19
- The export of account kits is now compatible with larger private keys. The group membership update process has been optimized to reduce request payload size and to avoid certain size limitations. Sorting of folder names has also been improved with natural number ordering, meaning for example that “folder2” now correctly appears before “folder10.”
22
+ ## Drag & drop users to groups
20
23
 
21
- Many thanks to everyone who shared feedback, reported issues, and helped refine these features.
24
+ Managing group membership often requires repetitive actions when working with large teams or frequently changing group structures. With Passbolt 5.8, administrators can now add users to a group by dragging them directly onto it from the Users & Groups workspace. This removes the need to open and edit each group individually and makes day-to-day group management faster and more fluid.
25
+
26
+ ## Miscellaneous improvements
27
+
28
+ As usual, this release includes fixes and smaller improvements intended to improve the overall experience. For the full list of changes, please refer to the changelog.
29
+
30
+ Many thanks to everyone who provided feedback and helped refine these features.
22
31
 
23
32
  ### Added
24
- - PB-39068 WP5-5.6 - Implement a Service RotateResourcesMetadataKeyService that proceed with the rotation of the key
25
- - PB-39069 WP5-5.8 - Implement a new method in MetadataKeysServiceWorkerService to call for to expire a key
26
- - PB-39071 WP5-5.1 - Implement a new method in MetadataKeysApiService to expire a shared metadata key
27
- - PB-39072 WP5-5.4 - Implement a new Service UpdateMetadataKeysService to process with the expiration of a key
28
- - PB-39073 WP5-5.2 - Implement a new API service MetadataRotateKeysResourcesApiService to retrieve the first page of data to rotate
29
- - PB-39074 WP5-5.3 - Implement a new method in MetadataKeysApiService to register the rotated data on the API
30
- - PB-39075 WP5-5.7 - Implement a Controller RotateResourcesMetadataKeyController to run the rotation process
31
- - PB-39076 WP5-5.9 - Implement a new method in MetadataKeysServiceWorkerService to call passbolt.metadata.rotate-resources-metadata for with the new Key
32
- - PB-39078 WP5-5.10 - Implement the ConfirmMetadataRotationDialog
33
- - PB-39094 WP5-6.2 - Display the rotate key button when multiple metadata key are active
34
- - PB-43253 Workspace resizable sidebars
35
- - PB-44582 lastpass example csv import with totp success
36
- - PB-45385 SN - WP1.1 Create the entity SecretDataV5StandaloneNoteEntity
37
- - PB-45389 SN - WP1.3 Update ResourceFormEntity to include secret SecretDataV5StandaloneNoteEntity
38
- - PB-45400 SN - WP2.1 Add new resource type in DisplayContentTypesAllowedContentTypesAdministration
39
- - PB-45404 SN - WP2.2 Add new resource type in DisplayResourcesWorkspaceMainMenu
40
- - PB-45406 SN - WP2.3 Update passbolt default resource type icons to include the new resource type icon
41
- - PB-45408 SN - WP2.4 Update DisplayResourcesListDetails to handle the correct subtitle for standalone note and add the same for standalone custom fields
42
- - PB-45412 SN - WP3.1 Apply a minimum height to the resource workspace ‘others’ dialog used to create other resource types
43
- - PB-45413 SN - WP3.3 Increase the height of the notes textarea to use the maximum available space in the resource creation dialog
44
- - PB-45414 SN - WP3.3 Add “hide” button when the note is decrypted to hide it again
45
- - PB-45417 SN - WP2.5 Update the “other” dialog to add the standalone note in the content type list in v5
46
- - PB-45424 SN - WP3.4 Ensure Import/Export is working as expected with standalone notes
47
- - PB-45464 GMUO - WP1.1 Create new collection ‘GroupUpdateCollection’
48
- - PB-45465 GMUO - WP1.2 Migrate group update logic to optimise the request on the API
49
- - PB-45466 GMUO - WP1.3 Adapt group update progress bar mechanism
50
- - PB-45476 WP5-6.3 - Create events with controller to rotate and resume rotation of a metadata key
33
+ - PB-46646 Reduce accidental destructive actions by moving Delete user and Disable MFA into a More menu in Users and groups
34
+ - PB-28298 Add users to groups by dragging and dropping
35
+ - PB-47198 Add exception to allow users to autofill workbench.cisecurity.org
36
+ - PB-46997 DR - WP1.1 Update RbacsCollection to EntityV2Collection and add new methods
37
+ - PB-46999 DR - WP1.2 Update RoleEntity schema and add new methods
38
+ - PB-47000 DR - WP1.3 Update RolesCollection to EntityV2Collection and add new methods
39
+ - PB-47002 DR - WP2.1 Update of RoleService to a RoleApiService
40
+ - PB-47003 DR - WP2.2 Update of RoleModel to a RoleService
41
+ - PB-47003 DR - WP2.3 Update of RbacService to a RbacApiService
42
+ - PB-47014 DR - WP2.4 Update of RbacModel to a RbacService
43
+ - PB-47015 DR - WP3.1 Create the FindAllRolesController and update the event
44
+ - PB-47015 DR - WP3.1 Create the FindAllRolesController and update the event
45
+ - PB-47017 DR - WP3.2 Update the FindMeController into a FindMeRbacController
46
+ - PB-47088 DR - WP3.3 Create the FindAndUpdateRolesLocalStorageController
47
+ - PB-47018 DR - WP4.1 Create RoleServiceWorkerService to get the roles
48
+ - PB-47019 DR - WP4.2 Create RbacServiceWorkerService to get the RBAC permissions of a signed-in user
49
+ - PB-47021 DR - WP4.3 Add the method canRoleUseAction in CanUseService
50
+ - PB-47089 DR - WP4.4 Add a method to find and update roles in local storage
51
+ - PB-47022 DR - WP5.1 Add the method canIUseAction in RbacContext
52
+ - PB-47023 DR - WP5.2 Verify the signed-in user's RBAC privileges before allowing access to the FilterUsersByGroup functionality
53
+ - PB-47024 DR - WP5.3 Verify the signed-in user's RBAC privileges before allowing access to the DisplayUserWorkspaceMainActions functionality
54
+
55
+ - PB-47023 DR - WP5.4 Verify the signed-in user's RBAC privileges before allowing access to the DisplayUserWorkspaceActions functionality
56
+ - PB-47036 DR - WP5.5 Verify the signed-in user's RBAC privileges before allowing access to the DisplayUsersWorkspaceFilterBar functionality
57
+ - PB-47037 DR - WP5.6 Verify the signed-in user's RBAC privileges before allowing access to the DisplayUsers functionality
58
+ - PB-47039 DR - WP5.7 Update CreateUser to select role in a dropdown component
59
+ - PB-47042 DR - WP5.8 Update EditUser to select role in a dropdown component
60
+ - PB-47027 DR - WP5.9 Create the component CreateRoleDialog
61
+ - PB-47028 DR - WP5.10 Create the component EditRoleDialog
62
+ - PB-47029 DR - WP5.11 Create the component DeleteRoleDialog
63
+ - PB-47030 DR - WP5.12 Update the style of DisplayRbacAdministration to match current design
64
+ - PB-47031 DR - WP5.13 Add create role in DisplayRbacAdministration
65
+ - PB-47032 DR - WP5.14 Display all roles in DisplayRbacAdministration
66
+ - PB-47033 DR - WP5.15 Add menu item to update the name of new role
67
+ - PB-47016 DR - WP5.16 Add menu item to delete new role
68
+ - PB-47090 DR - WP5.17 Update ManageAccountRecoveryUserSettings to use roles from context
69
+ - PB-47091 DR - WP5.18 Update ReviewAccountRecoveryRequest to use roles from context
70
+ - PB-47092 DR - WP5.19 Update DisplayScimSettingsAdministration to use roles from context
71
+ - PB-47093 DR - WP5.20 Update DisplayUserDetailsInformation to use roles from context
72
+ - PB-47094 DR - WP5.21 Update DisplayAccountRecoveryUserSettings to use roles from context
73
+ - PB-47095 DR - WP5.22 Update UserWorkspaceContext to use roles from context
74
+ - PB-47096 DR - WP5.23 Create the RoleContextProvider and add it on ExtAppContext
75
+ - PB-47214 DR - WP5.24 Update the RoleEntity to avoid name bypass
76
+ - PB-47215 DR - WP5.25 Update RolesCollection to filter out Guest role
77
+ - PB-47216 DR - WP5.26 Update FindRolesService to filter out guest role
78
+ - PB-47231 DR - WP5.27 Create component DeleteRoleNotAllowed
51
79
 
52
80
  ### Fixed
53
- - PB-43218 Date field icons should not be replaced with the copy icon in the SSO settings and expiry resource dialogs
54
- - PB-45239 Folders are not displayed in the correct order (GITHUB #568)
55
- - PB-45329 add TOTP toString handling similar to other csv exports
56
- - PB-45402 Add missing icon property to resource types schema definition
57
- - PB-45450 Fix account kit export with big private armored keys
58
- - PB-45458 Remove Organisation Settings max-width
59
- - PB-45733 Fix quickaccess resource creation with encrypted metadata
81
+ - PB-46180 Incorrect folder name encoding in sharing progress dialog
82
+ - PB-46612 Add missing border radius to secret history selected revision
83
+ - PB-45978 Resize bar continues dragging after mouse release
84
+ - PB-46905 Display the "Remove from group" action button to group managers
85
+ - PB-46627 Fix missing space in the “Advanced settings” of the password generator tabs between the last component and the CTA
86
+ - PB-46930 Secret history review should display an unknown user when creator does not exists
87
+ - PB-47298 KDBX not set expiry if never is set
60
88
 
61
89
  ### Maintenance
62
- - PB-44253 Upgrade vulnerable library form-data
63
- - PB-44593 Upgrade i18next to v24x
64
- - PB-45182 Major upgrade for copy-anything (Medium)
65
- - PB-45183 Minor upgrade for browserslist (Low)
66
- - PB-45184 3rd party Github Actions should be pinned (Medium)
67
- - PB-45401 Enforce the requirement of the property object_type for custom fields
68
- - PB-45484 Fix low security vulnerability dependency with web-ext to 8.10.0
69
- - PB-45583 Review and clean up npm overridden dependencies
70
- - PB-45601 Update the "Upgrade to Passbolt Pro" buttons URL
90
+ - PB-46636 Remove eslint v8 compatibility
91
+ - PB-46890 Small upgrade for js-yaml (Medium)
92
+ - PB-46831 Increase coverage of passbolt-styleguide DisplayUserTheme to 100%, and verify no change occurs when the user selects the already-selected theme
93
+ - PB-29338 React 18: upgrade changes with Legacy DOM renderer
94
+ - PB-47057 React 18: Remove unused dev dependency jest-dom
95
+ - PB-47069 DisplayResourceDetailsInformation Test Cases for Expired Passwords
96
+ - PB-46831 Increase coverage of passbolt-styleguide DisplayUserTheme to 100%
97
+ - PB-47069 DisplayResourceDetailsInformation Test Cases for Expired Passwords
98
+ - PB-47311 Major upgrade for serialize-javascript (Medium)
99
+ - PB-46832 Increase coverage of ThemeEntity
100
+ - PB-46833 Increase coverage of AccountSettingsService
101
+ - PB-46834 Increase coverage of ThemeModel
102
+ - PB-47011 ESLINT - WP1.1 Install phantom dependencies
@@ -1097,6 +1097,70 @@ classDiagram
1097
1097
  }
1098
1098
  }
1099
1099
 
1100
+ namespace groupsNS {
1101
+ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1102
+ %% Groups controllers
1103
+ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1104
+
1105
+ class FindMyGroupsController {
1106
+ event "passbolt.groups.find-my-groups"
1107
+ +exec() Promise~GroupsCollection~
1108
+ }
1109
+
1110
+ class UpdateAllGroupsLocalStorageController {
1111
+ event "passbolt.groups.update-local-storage"
1112
+ +exec() Promise~GroupsCollection~
1113
+ }
1114
+
1115
+ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1116
+ %% Groups services
1117
+ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1118
+
1119
+ class FindGroupsService {
1120
+ +findAll(object contains, object filters, object orders, boolean ignoreInvalidEntity) Promise~GroupsCollection~
1121
+ +findMyGroups() Promise~GroupsCollection~
1122
+ +findAllForLocalStorage() Promise~GroupsCollection~
1123
+ }
1124
+
1125
+ class FindAndUpdateGroupsLocalStorageService {
1126
+ +findAll() Promise~GroupsCollection~
1127
+ }
1128
+
1129
+ class GroupApiService {
1130
+ +get(string uuid) Promise~Object~
1131
+ +findAll(object contains, object filters, object orders) Promise
1132
+ +create(object data) Promise
1133
+ +update(string groupId, object groupData) Promise
1134
+ +updateDryRun(string groupId, string groupData) Promise
1135
+ +delete(string groupId, object transfer, boolean dryRun) Promise
1136
+ }
1137
+
1138
+ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1139
+ %% Groups models
1140
+ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1141
+
1142
+ class GroupLocalStorage {
1143
+ +flush() Promise~void~
1144
+ +get() Promise~Group~
1145
+ +set(GroupsCollection groupsCollection) Promise~void~
1146
+ +getGroupById(string uuid) Promise~Group~
1147
+ +addGroup(GroupEntity groupEntity) Promise~void~
1148
+ +updateGroup(GroupEntity groupEntity) Promise~void~
1149
+ +delete(string uuid) Promise~void~
1150
+ }
1151
+
1152
+ class GroupEntity {
1153
+ -uuid props.id
1154
+ -string props.name
1155
+ -string props.created
1156
+ -string props.modified
1157
+ -string props.createdBy
1158
+ -string props.modifiedBy
1159
+ -object props.groups_users
1160
+ -object props.my_group_user
1161
+ }
1162
+ }
1163
+
1100
1164
  %% Resource controllers relationships
1101
1165
  CreateResourceController*--CreateResourceService
1102
1166
  %% CreateResourceController*--GetPassphraseService
@@ -1289,4 +1353,14 @@ classDiagram
1289
1353
  AccountRecoveryGenerateOrganizationKeyController*--GenerateGpgKeyPairOptionsEntity
1290
1354
  %% GpgKey services relationships
1291
1355
  FindUserKeyPoliciesSettingsService*--UserKeyPoliciesSettingsApiService
1356
+
1357
+ %% Groups controllers relationships
1358
+ FindMyGroupsController*--FindGroupsService
1359
+ UpdateAllGroupsLocalStorageController*--FindAndUpdateGroupsLocalStorageService
1360
+ %% Groups services relationships
1361
+ FindGroupsService*--GroupApiService
1362
+ FindAndUpdateGroupsLocalStorageService*--FindGroupsService
1363
+ FindAndUpdateGroupsLocalStorageService*--GroupLocalStorage
1364
+
1365
+ GroupLocalStorage*--GroupEntity
1292
1366
  ```
@@ -0,0 +1,224 @@
1
+ import globals from 'globals';
2
+ import babelParser from '@babel/eslint-parser';
3
+ import path from 'path';
4
+ import {fileURLToPath} from 'url';
5
+
6
+ // ESLint plugins import
7
+ import js from '@eslint/js';
8
+ import noUnsanitizedPlugin from 'eslint-plugin-no-unsanitized';
9
+ import jestPlugin from 'eslint-plugin-jest';
10
+ import reactPlugin from 'eslint-plugin-react';
11
+ import importPlugin from 'eslint-plugin-import';
12
+
13
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
14
+
15
+ export default [
16
+ js.configs.recommended, // core JavaScript rules
17
+ reactPlugin.configs.flat.recommended, // React best practices
18
+ reactPlugin.configs.flat['jsx-runtime'], // JSX transform rules
19
+ importPlugin.flatConfigs.recommended, // import/export validations
20
+ {
21
+ files: ['**/*.{js,jsx,mjs,cjs}'],
22
+
23
+ languageOptions: {
24
+ parser: babelParser,
25
+ ecmaVersion: 2024,
26
+ sourceType: 'module',
27
+
28
+ parserOptions: {
29
+ requireConfigFile: false,
30
+ ecmaFeatures: {
31
+ jsx: true,
32
+ },
33
+ babelOptions: {
34
+ presets: ['@babel/preset-react'],
35
+ },
36
+ },
37
+
38
+ globals: {
39
+ ...globals.browser,
40
+ ...globals.node,
41
+ ...globals.es2024,
42
+ ...globals.webextensions,
43
+
44
+ // Custom globals
45
+ global: 'readonly',
46
+ port: 'readonly',
47
+ },
48
+ }, plugins: {
49
+ 'no-unsanitized': noUnsanitizedPlugin,
50
+ },
51
+
52
+ settings: {
53
+ react: {
54
+ version: 'detect',
55
+ },
56
+ 'import/resolver': {
57
+ node: {
58
+ paths: [__dirname], // Add project root to resolution paths
59
+ extensions: ['.js', '.jsx', '.mjs', '.cjs'],
60
+ },
61
+ alias: {
62
+ map: [
63
+ ['passbolt-styleguide', path.resolve(__dirname)],
64
+ ],
65
+ extensions: ['.js', '.jsx', '.ts', '.tsx'],
66
+ },
67
+ },
68
+ },
69
+
70
+ rules: {
71
+ /*
72
+ * ============================================
73
+ * CUSTOM OVERRIDES
74
+ * ============================================
75
+ */
76
+
77
+ "array-bracket-spacing": 1, // Enforces consistent spacing inside array brackets
78
+ "block-spacing": 1, // Enforces consistent spacing inside single-line blocks
79
+ "brace-style": ["warn", "1tbs", {allowSingleLine: true}], // Enforces one true brace style (opening brace on same line)
80
+ "comma-spacing": 1, // Enforces consistent spacing before/after commas
81
+ "computed-property-spacing": 1, // Enforces consistent spacing inside computed property brackets
82
+ "eol-last": 1, // Requires newline at the end of files
83
+ "func-call-spacing": 1, // Disallows spaces between function name and parentheses in calls
84
+ "key-spacing": ["warn", {mode: "minimum"}], // Enforces minimum spacing between keys and values in object literals
85
+ "keyword-spacing": 1, // Enforces consistent spacing before/after keywords (if, else, for, etc.)
86
+ "linebreak-style": 1, // Enforces consistent linebreak style (unix vs windows)
87
+ "no-trailing-spaces": 1, // Disallows trailing whitespace at the end of lines
88
+ "object-curly-spacing": ["warn", "never"], // Disallows spaces inside object curly braces
89
+ "one-var": ["error", {initialized: "never", uninitialized: "always"}], // Enforces variables declaration style (one declaration for uninitialized, separate for initialized)
90
+ "padded-blocks": ["warn", "never"], // Disallows padding blank lines within blocks
91
+ "semi": ["warn", "always"], // Requires semicolons at the end of statements
92
+ "semi-spacing": 1, // Enforces spacing before/after semicolons
93
+ "space-before-blocks": 1, // Requires space before opening brace of blocks
94
+ "space-before-function-paren": ["warn", "never"], // Disallows space before function parentheses
95
+ "space-in-parens": ["warn", "never"], // Disallows spaces inside parentheses
96
+ "space-infix-ops": 1, // Requires spaces around infix operators (+, -, =, etc.)
97
+ "arrow-body-style": ["warn", "as-needed"], // Requires braces around arrow function body only when needed
98
+ "arrow-parens": ["warn", "as-needed"], // Requires parens around arrow function parameters only when needed
99
+ "arrow-spacing": 1, // Enforces consistent spacing before/after arrow function arrows
100
+ "template-curly-spacing": ["warn", "never"], // Disallows spaces inside template literal curly braces
101
+ "multiline-comment-style": ["error", "starred-block"], // Enforces starred-block style for multiline comments (/* * */)
102
+ "indent": ["warn", 2, {MemberExpression: 1, SwitchCase: 1}], // Enforces 2 spaces indentation with specific rules for member expressions and switch cases
103
+ // "object-shorthand": ["error", "consistent"],
104
+
105
+
106
+ // Critical rules not in recommended configs
107
+ 'curly': 'error', // Always use braces
108
+ 'no-implicit-coercion': 'error', // No implicit type coercion
109
+ 'no-implicit-globals': 'error', // No implicit global variables
110
+ 'no-unsanitized/method': 'error', // Prevent XSS via innerHTML
111
+ 'no-unsanitized/property': 'error', // Prevent XSS via outerHTML
112
+
113
+ // Our specific preferences (override recommended)
114
+ 'no-console': 'off', // Allow console.log in dev
115
+ 'react/display-name': 'off', // Don't require display names
116
+ 'react/prop-types': 'off', // Skip PropTypes (future TypeScript)
117
+ 'no-useless-escape': 'off', // Too many false positives
118
+ "func-names": [
119
+ "error",
120
+ "never"
121
+ ],
122
+
123
+ // Phantom dependency detection (CRITICAL)
124
+ 'import/no-extraneous-dependencies': ['error', {
125
+ devDependencies: [
126
+ '**/*.test.{js,jsx}',
127
+ '**/*.spec.{js,jsx}',
128
+ '**/__tests__/**',
129
+ '**/test/**',
130
+ '**/tests/**',
131
+ '**/scripts/**',
132
+ '*.config.{js,mjs,cjs}',
133
+ 'webpack.config.js',
134
+ ],
135
+ optionalDependencies: false,
136
+ peerDependencies: true,
137
+ }],
138
+
139
+ // Browser extension specific
140
+ 'n/no-unsupported-features/node-builtins': 'off', // We use browser APIs
141
+ 'n/no-missing-import': 'off', // Handled by import plugin
142
+ 'n/no-missing-require': 'off', // Handled by import plugin
143
+
144
+ // Muted during migration
145
+ 'import/no-named-as-default-member': 'off',
146
+ 'import/no-duplicates': 'off',
147
+ 'import/named': 'off',
148
+ 'import/no-named-as-default': 'off',
149
+ 'no-empty': 'off',
150
+ 'react/jsx-uses-react': 'error', // Marks React as used when JSX is present
151
+ 'react/jsx-uses-vars': 'error', // Marks JSX components as used
152
+ 'react/react-in-jsx-scope': 'error', // Ensures React is in scope for JSX
153
+ },
154
+ },
155
+ /*
156
+ * ============================================
157
+ * TEST FILES CONFIGURATION
158
+ * ============================================
159
+ */
160
+ {
161
+ files: [
162
+ '**/*.test.{js,jsx}',
163
+ '**/*.test.data.{js,jsx}',
164
+ '**/*.test.page.{js,jsx}',
165
+ '**/*.test.page.object.{js,jsx}',
166
+ '**/*.test.stories.{js,jsx}',
167
+ '**/*.spec.{js,jsx}',
168
+ '**/__tests__/**',
169
+ '**/test/mock/**',
170
+ ],
171
+
172
+ languageOptions: {
173
+ globals: {
174
+ ...globals.jest,
175
+ },
176
+ },
177
+
178
+ plugins: {
179
+ jest: jestPlugin,
180
+ },
181
+
182
+ rules: {
183
+ ...jestPlugin.configs['flat/recommended'].rules,
184
+
185
+ // Test-specific overrides
186
+ 'no-console': 'off', // Allow console in tests
187
+ 'import/no-extraneous-dependencies': 'off', // Dev deps OK in tests
188
+ 'jest/prefer-expect-assertions': 'off', // Not always needed
189
+
190
+ // Rules muted during migration
191
+ 'jest/no-conditional-expect': 'off',
192
+ 'jest/valid-title': 'off',
193
+ 'jest/no-alias-methods': 'off',
194
+ 'jest/no-export': 'off',
195
+ 'jest/valid-expect': 'off',
196
+ 'jest/no-identical-title': 'off',
197
+ 'jest/expect-expect': 'off',
198
+ 'jest/valid-expect-in-promise': 'off',
199
+ 'jest/no-disabled-tests': 'off',
200
+ 'jest/valid-describe-callback': 'off',
201
+ 'jest/no-focused-tests': 'off',
202
+ 'jest/no-standalone-expect': 'off'
203
+ },
204
+ },
205
+ /*
206
+ * ============================================
207
+ * BUILD/CONFIG FILES
208
+ * ============================================
209
+ */
210
+ {
211
+ files: ['*.config.{js,mjs,cjs}', 'scripts/**/*.js', 'webpack.config.js'],
212
+
213
+ languageOptions: {
214
+ globals: {
215
+ ...globals.node,
216
+ },
217
+ },
218
+
219
+ rules: {
220
+ 'no-console': 'off', // Allow console in scripts
221
+ 'import/no-extraneous-dependencies': 'off', // Dev deps OK in configs
222
+ },
223
+ },
224
+ ];