* Extract getFeatureFlagValue to pure function
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
* Add broadcasting abstractions and OnServerConfigChange interface.
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
* Add implementation of onServerConfigChange on encrypt services
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
* Add onServerConfigChange implementation for encrypt worker
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
* Wire up broadcasting in dependency injection
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
* Add unit tests
* Handle subscribing for onServerConfigChange in init services
---------
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
* Add new export format: zip
* Restrict zip export to just individual vaults
* Add tests
* Remove unused import
* Fix build error
* Fix tests
* Fix test
* Fix retrieval of ciphers by passing in activeUserId
* Guard feature behind `export-attachments`-feature-flag
* Extend cipher filter to also filter out any ciphers that are assigned to an organization
* Added apiService to retrieve AttachmentData (metaData) and then download the attachment
- Added ApiService as a depdency within DI for VaultExportService/IndividualVaultExportService
- Added unit tests for filtering ciphers
- Added unit test for downloading attachment metadata and attachments
* Moved attachment decryption into a separate method and added unit tests
* Added null check for creating the base attachment folder
* Move format check for zip within Org export into an early return/throw
* Add feature flag guard on the CLI
* Extend ExportScopeCallout to display an individual export will contain attachment when zip-format is selected
* Fix adding/removing the zip-export option based on selected vault and state of `export-attachments` feature-flag
* Separate AAA visually using whitespace within tests
* Remove unused error var
* Write test that verifies different http request failures when retrieving attachment data
* Remove uneeded ignore lint rule
* Rewrite test to actually check that ciphers assigned to an org are filtered out
* Introduce ExportedVault return type (#13842)
* Define ExportedVault type unioned by 2 new types that describe a plain-text export vs a blob-based zip-export
* Extend static getFileName to handle formats and add unit-tests
* Introduce new export return type throughout the vault export module
- Update abstractions
- Update return types within implementations
- Update callers/consumers to handle the new return value
- Fix all unit tests
* Add support for new export return type and fix download of blobs via CLI
* Add documentation to public methods
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
---------
Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
* Refactored totp service to use sdk
Fixed strict typescript issues
* Fixed dependency issues
* Returned object that contains code and period, removed get interval function
* removed dependencies
* Updated to use refactored totp service
* removed sdk service undefined check
* removed undefined as an input from the getCode function
* Made getcode$ an observable
* refactored to use getcodee$
* Filter out emmissions
* updated sdk version
* Fixed readability nit
* log error on overlay if totp response does not return a code
* fix(totpGeneration): [PM-11941] Totp countdown not working on clients
* Used optional chaining if totpresponse returns null or undefined
* move vault timeout and vault timeout settings to km
* move browser vault timeout service to km
* fix cli import
* fix imports
* fix some relative imports
* use relative imports within common
* fix imports
* fix new imports
* Fix new imports
* fix spec imports
* [BRE-610] - Sign windows CLI
* little fix
* testing path to script
* testing script path
* Testing windows signing script
* single line run
---------
Co-authored-by: Andy Pixley <3723676+pixman20@users.noreply.github.com>
* feat: initalize WASM/SDK directly after load
* fix: default sdk service trying to set log level
* feat: wait for sdk to load in sdk service
* fix: add required disposable polyfills
* feat: update sdk version
* feat: replace rc-specific workaround with global polyfill
* fix: sdk service tests
* Moved saving of SSO email outside of browser/desktop code
* Clarified comments.
* Tests
* Refactored login component services to manage state
* Fixed input on login component
* Fixed tests
* Linting
* Moved web setting in state into web override
* updated tests
* Fixed typing.
* Fixed type safety issues.
* Added comments and renamed for clarity.
* Removed method parameters that weren't used
* Added clarifying comments
* Added more comments.
* Removed test that is not necessary on base
* Test cleanup
* More comments.
* Linting
* Fixed test.
* Fixed base URL
* Fixed typechecking.
* Type checking
* Moved setting of email state to default service
* Added comments.
* Consolidated SSO URL formatting
* Updated comment
* Fixed reference.
* Fixed missing parameter.
* Initialized service.
* Added comments
* Added initialization of new service
* Made email optional due to CLI.
* Fixed comment on handleSsoClick.
* Added SSO email persistence to v1 component.
---------
Co-authored-by: Bernd Schoolmann <mail@quexten.com>
* Exposes URI property from the cipher form.
* Updates credential generator to accept the URI using a `website` attribute
---------
Co-authored-by: ✨ Audrey ✨ <audrey@audreyality.com>
* Cipher service web changes
* Updated browser client to pass user id to cipher service observable changes
* Cli changes
* desktop changes
* Fixed test
* Libs changes
* Fixed merge conflicts
* Fixed merge conflicts
* removed duplicate reference fixed conflict
* Fixed test
* Fixed test
* Fixed test
* Fixed desturcturing issue on failed to decrypt ciphers cipher service
* Updated abstraction to use method syntax
* Fixed conflicts
* Fixed test on add edit v2
Passed active userId to delete function
* Used getUserId utility function
* made vault changes
* made suggestion changes
* made suggestion changes
* made suggestion changes
* Replace getUserId function calls with pipe operator syntax for better consistency
* fixed merge conflicts
* revert mistake made of usinf account activity during merge conflict fix
* fixed conflicts
* fixed tests
* Move encrypt service to km ownership
* Update imports for encrypt service abstraction and move bulk encrypt service abstraction
* Fix imports
* Fix further imports
* Fix imports
* Fix worker import
Only users with Manage/Edit permissions will be allowed to Assign To Collections. If the user has Can Edit Except Password the collections dropdown will be disabled.
---------
Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
Co-authored-by: kejaeger <138028972+kejaeger@users.noreply.github.com>
* feat(newdeviceVerificaiton) : adding component and request model
* feat(newDeviceverification) : adding state structure to track verify devices for active user; added API call to server.
* feat(newDeviceVerification) : added visual elements for opting out of new device verification.
* Fixing tests for account service.
fixed DI for account service
* Fixing strict lint issues
* debt(deauthorizeSessionsModal) : changed modal to dialog. fixed strict typing for the new dialog for deviceVerification.
* fixing tests
* fixing desktop build DI
* changed dialog to standalone fixed names and comments.
* Adding tests for AccountService
* fix linting
* PM-15605 - AccountComp - fix ngOnDestroy erroring as it was incorrectly decorated with removed property.
* PM-15605 - SetAccountVerifyDevicesDialogComponent - only show warning about turning off new device verification if user doensn't have 2FA configured per task description
---------
Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
Co-authored-by: Jared Snider <jsnider@bitwarden.com>
The legacy config is deprecated and will be removed in eslint 10. The flat config also allows us to write js functions which will assist in handling limitations with multiple identical rules.
* create service to load sdk on application init
* Eagerly load CLI SDK
* Remove wasm logging to api
* Fix imports
* Eagerly load Desktop renderer SDK
Note: If the main process ever requires an SDK, we'll need to load it there, too.
In that event, it's probably a good idea to move to IPC for all SDK functions to avoid
loading the SDK for every window.
* init wasm module from sdk load service
* Use default client factory
* Fix type imports
* Resolve jest module import errors
A CLI sdk load service that async imports our wasm binary doesn't seem to be needed to run, but jest isn't dealing with the ESM import properly.
* Fix linting
* remove example code
* [PM-15506] Wire up vNextOrganizationService for libs/common and libs/angular (#12683)
* Wire up vNextOrganizationService in PolicyService
* Wire vNextOrganizationService in SyncService
* wire vNextOrganizationService for EventCollectionService
* wire vNextOrganizationService for KeyConnectorService
* wire up vNextOrganizationService for CipherAuthorizationService
* Wire up vNextOrganizationService in PolicyService
* Wire vNextOrganizationService in SyncService
* wire vNextOrganizationService for EventCollectionService
* wire vNextOrganizationService for KeyConnectorService
* wire up vNextOrganizationService for CipherAuthorizationService
* wire vNextOrganizationService for share.component
* wire vNextOrganizationService for collections.component
* wire vNextOrganizationServcie for add-account-credit-dialog
* wire vNextOrganizationService for vault-filter.service
* fix browser errors for vNextOrganizationService implementation in libs
* fix desktop errors for vNextOrganizationService implementation for libs
* fix linter errors
* fix CLI errors on vNextOrganizationServcie implementations for libs
* [PM-15506] Wire up vNextOrganizationService for web client (#12810)
PR to a feature branch, no need to review until this goes to main.
* implement vNextOrganization service for browser client (#12844)
PR to feature branch, no need for review yet.
* wire vNextOrganizationService for licence and some web router guards
* wire vNextOrganizationService in tests
* remove vNext notation for OrganizationService and related
* Merge branch 'main' into ac/pm-15506-vNextOrganizationService
* fix tsstrict error
* fix test, fix ts strict error
* [deps] SM: Update typescript-eslint monorepo to v8
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Hinton <hinton@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>