This PR makes it so the devices are always sorted in this order (by default):
1. Has Pending Auth Request (if any) comes first
2. Current Device comes second (or first if there are no pending auth requests)
3. First Login Date - the rest of the devices are sorted by first login date (newest to oldest)
This sort order is preserved even after a user approves/denies and auth request - that is, the approved/denied device will re-sort to its correct position according to it's first login date.
Feature Flag: `PM14938_BrowserExtensionLoginApproval`
- Renames the `LoginApprovalComponent` to `LoginApprovalDialogComponent`
- Renames the property `notificationId` to `authRequestId` for clarity
- Updates text content on the component
* Move pin service to km ownership
* Run format
* Eslint
* Fix tsconfig
* Fix imports and test
* Clean up imports
* Remove unused dependency on PinService
* Fix comments
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
* Introduce ActiveUserAccessor
* Use ActiveUserAccessor over AccountService
* Updates tests and testing utils to support ActiveUserAccessor
* Update all injection points
* Fix types test
* Use ternary instead
* Removed flag and components.
* More cleanup
* Removed ChangePasswordComponent.
* Removed old EmergencyAccessTakeover
* Removed service initialization.
* Fixed test failures.
* Fixed tests.
* Test changes.
* Updated comments
* Delete old password-strength component
A PasswordStrengthV2Component had been created in July 2024 and now all usages of the old component have been replaced.
* Re-add canAccessFeature back into app-routing.module.
Messed up by merging main.
---------
Co-authored-by: Todd Martin <tmartin@bitwarden.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Adds a `redirect-to-vault-if-unlocked.guard.ts` that does the following:
- If there is no active user, allow access to the route
- If the user is specifically Unlocked, redirect the user to /vault
- Otherwise, allow access to the route (fallback/default)
* add `CipherViewLike` and utilities to handle `CipherView` and `CipherViewLike`
* migrate libs needed for web vault to support `CipherViewLike`
* migrate web vault components to support
* add for CipherView. will have to be later
* fetch full CipherView for copying a password
* have only the cipher service utilize SDK migration flag
- This keeps feature flag logic away from the component
- Also cuts down on what is needed for other platforms
* strongly type CipherView for AC vault
- Probably temporary before migration of the AC vault to `CipherListView` SDK
* fix build icon tests by being more gracious with the uri structure
* migrate desktop components to CipherListViews$
* consume card from sdk
* add browser implementation for `CipherListView`
* update copy message for single copiable items
* refactor `getCipherViewLikeLogin` to `getLogin`
* refactor `getCipherViewLikeCard` to `getCard`
* add `hasFido2Credentials` helper
* add decryption failure to cipher like utils
* add todo with ticket
* fix decryption failure typing
* fix copy card messages
* fix addition of organizations and collections for `PopupCipherViewLike`
- accessors were being lost
* refactor to getters to fix re-rendering bug
* fix decryption failure helper
* fix sorting functions for `CipherViewLike`
* formatting
* add `CipherViewLikeUtils` tests
* refactor "copiable" to "copyable" to match SDK
* use `hasOldAttachments` from cipherlistview
* fix typing
* update SDK version
* add feature flag for cipher list view work
* use `CipherViewLikeUtils` for copyable values rather than referring to the cipher directly
* update restricted item type to support CipherViewLike
* add cipher support to `CipherViewLikeUtils`
* update `isCipherListView` check
* refactor CipherLike to a separate type
* refactor `getFullCipherView` into the cipher service
* add optional chaining for `uriChecksum`
* set empty array for decrypted CipherListView
* migrate nudge service to use `cipherListViews`
* update web vault to not depend on `cipherViews$`
* update popup list filters to use `CipherListView`
* fix storybook
* fix tests
* accept undefined as a MY VAULT filter value for cipher list views
* use `LoginUriView` for uri logic (#15530)
* filter out null ciphers from the `_allDecryptedCiphers$` (#15539)
* use `launchUri` to avoid any unexpected behavior in URIs - this appends `http://` when missing
Creates a new `DeviceManagementComponent` that fetches devices and formats them before handing them off to a view component for display.
View components:
- `DeviceManagementTableComponent` - displays on medium to large screens
- `DeviceManagementItemGroupComponent` - displays on small screens
Feature flag: `PM14938_BrowserExtensionLoginApproval`
* fix(change-password): [PM-23811] Tooltip Missing Bug - Fixed import to show tooltip.
* fix(change-password-component): Change Password Update [18720] - Changed to use common module.
* PM-23700 - SendPasswordService - create and test
* PM-23700 - SendPassword Service comment clean up
* PM-23700 - Use barrel file exports and register default service.
* PM-23700 - DefaultSendPasswordService - work with Bernd to deliver better service
* Removed flag.
* Fixed tests to no longer reference flag.
* Fixed test.
* Removed duplicate test class.
* Moved files into folders for yubikey and authenticator
* Removed TwoFactorAuthEmailComponentService since it is no longer needed
* Removed export
* Fixed export
* feat(change-password-component): Change Password Update [18720] - Very close to complete.
* fix(policy-enforcement): [PM-21085] Fix Bug with Policy Enforcement - Removed temp code to force the state I need to verify correctness.
* fix(policy-enforcement): [PM-21085] Fix Bug with Policy Enforcement - Recover account working with change password component.
* fix(policy-enforcement): [PM-21085] Fix Bug with Policy Enforcement - Made code more dry.
* fix(change-password-component): Change Password Update [18720] - Updates to routing and the extension. Extension is still a wip.
* fix(change-password-component): Change Password Update [18720] - Extension routing changes.
* feat(change-password-component): Change Password Update [18720] - More extension work
* feat(change-password-component): Change Password Update [18720] - Pausing work for now while we wait for product to hear back.
* feat(change-password-component): Change Password Update [18720] - Removed duplicated anon layouts.
* feat(change-password-component): Change Password Update [18720] - Tidied up code.
* feat(change-password-component): Change Password Update [18720] - Small fixes to the styling
* feat(change-password-component): Change Password Update [18720] - Adding more content for the routing.
* feat(change-password-component): Change Password Update [18720] - Removed circular loop for now.
* feat(change-password-component): Change Password Update [18720] - Made comments regarding the change password routing complexities with change-password and auth guard.
* feat(change-password-component): Change Password Update [18720] - Undid some changes because they will be conflicts later on.
* feat(change-password-component): Change Password Update [18720] - Small directive change.
* feat(change-password-component): Change Password Update [18720] - Small changes and added some clarification on where I'm blocked
* feat(change-password-component): Change Password Update [18720] - Org invite is seemingly working, found one bug to iron out.
* refactor(change-password-component): Change Password Update [18720] - Fixed up policy service to be made more clear.
* docs(change-password-component): Change Password Update [18720] - Updated documentation.
* refactor(change-password-component): Change Password Update [18720] - Routing changes and policy service changes.
* fix(change-password-component): Change Password Update [18720] - Wrapping up changes.
* feat(change-password-component): Change Password Update [18720] - Should be working fully
* feat(change-password-component): Change Password Update [18720] - Found a bug, working on password policy being present on login.
* feat(change-password-component): Change Password Update [18720] - Turned on auth guard on other clients for change-password route.
* feat(change-password-component): Change Password Update [18720] - Committing intermediate changes.
* feat(change-password-component): Change Password Update [18720] - The master password policy endpoint has been added! Should be working. Testing now.
* feat(change-password-component): Change Password Update [18720] - Minor fixes.
* feat(change-password-component): Change Password Update [18720] - Undid naming change.
* feat(change-password-component): Change Password Update [18720] - Removed comment.
* feat(change-password-component): Change Password Update [18720] - Removed unneeded code.
* fix(change-password-component): Change Password Update [18720] - Took org invite state out of service and made it accessible.
* fix(change-password-component): Change Password Update [18720] - Small changes.
* fix(change-password-component): Change Password Update [18720] - Split up org invite service into client specific implementations and have them injected into clients properly
* feat(change-password-component): Change Password Update [18720] - Stopping work and going to switch to a new branch to pare down some of the solutions that were made to get this over the finish line
* feat(change-password-component): Change Password Update [18720] - Started to remove functionality in the login.component and the password login strategy.
* feat(change-password-component): Change Password Update [18720] - Removed more unneded changes.
* feat(change-password-component): Change Password Update [18720] - Change password clearing state working properly.
* fix(change-password-component): Change Password Update [18720] - Added docs and moved web implementation.
* comments(change-password-component): Change Password Update [18720] - Added more notes.
* test(change-password-component): Change Password Update [18720] - Added in tests for policy service.
* comment(change-password-component): Change Password Update [18720] - Updated doc with correct ticket number.
* comment(change-password-component): Change Password Update [18720] - Fixed doc.
* test(change-password-component): Change Password Update [18720] - Fixed tests.
* test(change-password-component): Change Password Update [18720] - Fixed linting errors. Have more tests to fix.
* test(change-password-component): Change Password Update [18720] - Added back in ignore for typesafety.
* fix(change-password-component): Change Password Update [18720] - Fixed other type issues.
* test(change-password-component): Change Password Update [18720] - Fixed tests.
* test(change-password-component): Change Password Update [18720] - Fixed more tests.
* test(change-password-component): Change Password Update [18720] - Fixed tiny duplicate code.
* fix(change-password-component): Change Password Update [18720] - Fixed desktop component.
* fix(change-password-component): Change Password Update [18720] - Removed unused code
* fix(change-password-component): Change Password Update [18720] - Fixed locales.
* fix(change-password-component): Change Password Update [18720] - Removed tracing.
* fix(change-password-component): Change Password Update [18720] - Removed duplicative services module entry.
* fix(change-password-component): Change Password Update [18720] - Added comment.
* fix(change-password-component): Change Password Update [18720] - Fixed unneeded call in two factor to get user id.
* fix(change-password-component): Change Password Update [18720] - Fixed a couple of tiny things.
* fix(change-password-component): Change Password Update [18720] - Added comment for later fix.
* fix(change-password-component): Change Password Update [18720] - Fixed linting error.
* PM-18720 - AuthGuard - move call to get isChangePasswordFlagOn down after other conditions for efficiency.
* PM-18720 - PasswordLoginStrategy tests - test new feature flagged combine org invite policies logic for weak password evaluation.
* PM-18720 - CLI - fix dep issue
* PM-18720 - ChangePasswordComp - extract change password warning up out of input password component
* PM-18720 - InputPassword - remove unused dependency.
* PM-18720 - ChangePasswordComp - add callout dep
* PM-18720 - Revert all anon-layout changes
* PM-18720 - Anon Layout - finish reverting changes.
* PM-18720 - WIP move of change password out of libs/auth
* PM-18720 - Clean up remaining imports from moving change password out of libs/auth
* PM-18720 - Add change-password barrel file for better import grouping
* PM-18720 - Change Password comp - restore maxWidth
* PM-18720 - After merge, fix errors
* PM-18720 - Desktop - fix api service import
* PM-18720 - NDV - fix routing.
* PM-18720 - Change Password Comp - add logout service todo
* PM-18720 - PasswordSettings - per feedback, component is already feature flagged behind PM16117_ChangeExistingPasswordRefactor so we can just delete the replaced callout (new text is in change-password comp)
* PM-18720 - Routing Modules - properly flag new component behind feature flag.
* PM-18720 - SSO Login Strategy - fix config service import since it is now in shared deps from main merge.
* PM-18720 - Fix SSO login strategy tests
* PM-18720 - Default Policy Service - address AC PR feedback
---------
Co-authored-by: Jared Snider <jsnider@bitwarden.com>
Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
* WIP - default collection sorting
* apply filtering to popup list filters service.
* add tests. add feature flag checks
* finalize my items collection filters
* fix type error
* re-add service
* re-add comment
* remove unused code
* fix sorting logic
* shorten variable name to fit one line
* fix error
* fix more errors
* abstract logic to vault filter service
* fix test
* export sort as function instead of adding to class
* fix more tests
* add collator arg
* remove ts-ignore. fix type errors
* remove optional param
* fix vault filter service
When a user logs in via SSO after their org has offboarded from TDE, we now show them a helpful error message stating that they must either login on a Trusted device, or ask their admin to assign them a password.
Feature flag: `PM16117_SetInitialPasswordRefactor`
* Add new device type for DuckDuckGo browser
* Added feature support property for sync domains
* Added new features
* Added isDuckDuckGo() to CLI
* Addressed PR feedback.
* Renamed new property
* Fixed rename that missed CLI.
This PR makes it so that `SetInitialPasswordComponent` handles the TDE offboarding flow where an org user now needs to set an initial master password.
Feature flag: `PM16117_SetInitialPasswordRefactor`
Creates a `SetInitialPasswordComponent` to be used in scenarios where an existing and authed user must set an initial password.
Feature Flag: `PM16117_SetInitialPasswordRefactor`
* feat: Create methods for calling GET auth-request/pending endpoint.
* feat: update banner service on web, and desktop vault
* test: updated banner test to use auth request services
* fix: DI fixes
* feat: add RequestDeviceId to AuthRequestResponse
* fix: add Browser Approvals feature flags to desktop vault and web vault banner service
* test: fix tests for feature flag
* Created new service to get restricted types for the CLI
* Created service for cli to get restricted types
* Utilized restriction service in commands
* Renamed function
* Refactored service and made it simpler to check when a cipher type is restricted or not
* Moved service to common so it can be utilized on the cli
* Refactored service to use restricted type service
* Removed userId passing from commands
* Exclude restrict types from export
* Added missing dependency
* Added missing dependency
* Added missing dependency
* Added service utils commit from desktop PR
* refactored to use reusable function
* updated reference
* updated reference
* Fixed merge conflicts
* Refactired services to use isCipherRestricted
* Refactored restricted item types service
* Updated services to use the reafctored item types service
* add restricted item types to legacy vault components
* filter out restricted item types from new menu item in desktop
* use CIPHER_MENU_ITEMS
* use CIPHER_MENU_ITEMS. move restricted cipher service to common
* use move restricted item types service to libs. re-use cipher menu items
* add shareReplay. change variable name
* move restricted filter to search service. remove unecessary import
* add reusable service method
* clean up spec
* add optional chain
* remove duplicate import
* move isCipherViewRestricted to service module
* fix logic
* fix logic
* remove extra space
---------
Co-authored-by: SmithThe4th <gsmith@bitwarden.com>