* consider admin console context when determining export types and callout
* checkpoint on simplified fix before swapping to signals
* Update libs/tools/export/vault-export/vault-export-ui/src/components/export.component.ts
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
* Update libs/tools/export/vault-export/vault-export-ui/src/components/export.component.ts
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
---------
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
* Made domain classes ts-strict compliant and fixed spec files
* Fixed domain base class and other test files
* Added conditional utils and fixed small nits
* removed comments
* removd ts expect errors
* Added removed counter
* renamed test name
* fixed tests
• prefer undefined over null
• obtain required UserId once per method, before branching
• guards moved to beginning of methods
* lift UserId retrieval to occur once during import
* remove redundant userId retrieval
* add support for export-scope-callout.component to conditionally render organizational export message
* avoid null comparison and remove explicit undefined type parameter
* add support for export-scope-callout.component to conditionally render organizational export message
• use config service to capture feature flag status
• use platform service and routing to determine admin console context
* replace deprecated getOrgKey() method
• obtain account using `accountService.activeAccount$` and then use id property to guarentee validity of UserId
Add Nx project.json configurations and test scripts to all 8 nested libraries:
- @bitwarden/send-ui
- @bitwarden/generator-core
- @bitwarden/generator-components
- @bitwarden/vault-export-core
- @bitwarden/vault-export-ui
- @bitwarden/generator-history
- @bitwarden/generator-legacy
- @bitwarden/generator-navigation
All libraries now have working nx build, nx lint, and nx test commands.
* Require userId for KdfConfigService
* cleanup KdfConfigService unit tests
* Move required userId for export request up to component/command level
* Fix service creation/dependency injection
* Revert changes to kdf-config.service.spec cause by a bad rebase
* Fix linting issue
* Fix tests caused by bad rebase
* Validate provided userId to equal the current active user
* Create tests for vault-export.service
Deleted old tests which since have been replaced with individual-vault-export.service.spec.ts
---------
Co-authored-by: Thomas Avery <tavery@bitwarden.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
* Introduce a new vault-export-api.service to replace the existing getOrganizationExport method in apiService
* Use new vault-export-api.service instead of the ApiService to retrieve organizational export data
* Remove unused method from apiService
* Register VaultExportApiService on browser
* Fxi linting issue by executing `npm run prettier`
* Rename abstraction and implementation of VaultExportApiService
* Use undefined instead of null
* Rename file of default impl of vault-export-api-service
* Fix test broken with 1bcdd80eea
* Define type for exportPromises
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
* Throw error if appA11yTitle is null in icon button
* Add required label input
* Fix icon button errors in CL components and storeis
* fix popover aria-label errors
* remove commented code
* add labels to icon buttons in browser
* add labels to icon buttons in web
* add labels to icon buttons in license
* add labels to icon buttons in send
* add labels to icon buttons in angular
* fix missing pipe error
* fix sso icon button missed in error
* update labels in vault
* add section expand button label
* Adding labels to icon buttons
* Add lint rule to not allow icon buttons without label input
* rename util file
* trigger updates on title change
* update eslint rule name and folder
* add edit collection label to vault headers
* fix web header story label
* add show/hide summary labels
* update summary message
* fix breadcrumbs label message
* fix JSDoc to use correct input
* remove commented code
* use label as aria-label always. Remove init function
* add moreBreadcrumbs translation message to other apps
* add @bitwarden/team-ui-foundation as code owner for component eslint rules
* switch title to const variable
* add jsdoc comment on what the label input is used for
* [PM-22415] Tax ID notifications for Organizations and Providers (#15996)
* [NO LOGIC] Rename BillableEntity to BitwardenSubscriber
This helps us maintain paraody with server where we call this choice type ISubscriber. I chose BitwardenSubscriber to avoid overlap with RxJS
* [NO LOGIC] Move subscriber-billing.client to clients folder
* [NO LOGIC] Move organization warnings under organization folder
* Move getWarnings from OrganizationBillingApiService to new OrganizationBillingClient
I'd like us to move away from stashing so much in libs and utilizing the JsLibServicesModule when it's not necessary to do so. These are invocations used exclusively by the Web Vault and, until that changes, they should be treated as such
* Refactor OrganizationWarningsService
There was a case added to the Inactive Subscription warning for a free trial, but free trials do not represent inactive subscriptions so this was semantically incorrect. This creates another method that pulls the free trial warning and shows a dialog asking the user to subscribe if they're on one.
* Implement Tax ID Warnings throughout Admin Console and Provider Portal
* Fix linting error
* Jimmy's feedback
* remove duplicate messages keys
* revert changes to popover stories
* add back dupe myItems key for now as it was already here
* fix directive type errors
* remove variable left in error from merge conflict
* revert unintentional change to reports layout
* add back reports change
---------
Co-authored-by: Alex Morask <144709477+amorask-bitwarden@users.noreply.github.com>
* 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>
* 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
* Created mappings for client domain object to SDK
* Add abstract decrypt observable
* Added todo for future consideration
* Added implementation to cipher service
* Added adapter and unit tests
* Created cipher encryption abstraction and service
* Register cipher encryption service
* Added tests for the cipher encryption service
* changed signature
* Updated feature flag name
* added new function to be used for decrypting ciphers
* Added new encryptedKey field
* added new function to be used for decrypting ciphers
* Manually set fields
* Added encrypted key in attachment view
* Fixed test
* Updated references to use decrypt with feature flag
* Added dependency
* updated package.json
* lint fix
* fixed tests
* Fixed small mapping issues
* Fixed test
* Added function to decrypt fido2 key value
* Added function to decrypt fido2 key value and updated test
* updated to use sdk function without prociding the key
* updated localdata sdk type change
* decrypt attachment content using sdk
* Fixed dependency issues
* updated package.json
* Refactored service to handle getting decrypted buffer using the legacy and sdk implementations
* updated services and component to use refactored version
* Updated decryptCiphersWithSdk to use decryptManyLegacy for batch decryption, ensuring the SDK is only called once per batch
* Fixed merge conflicts
* Fixed merge conflicts
* Fixed merge conflicts
* Fixed lint issues
* Moved getDecryptedAttachmentBuffer to cipher service
* Moved getDecryptedAttachmentBuffer to cipher service
* ensure CipherView properties are null instead of undefined
* Fixed test
* ensure AttachmentView properties are null instead of undefined
* Linked ticket in comment
* removed unused orgKey
* fix(enums-eslint): Enum Rule for ESLint - Added enums in the warnings for eslint.
* fix(enums-eslint): Enum Rule for ESLint - Updated to error in both places for enums.
* fix(enums-eslint): Enum Rule for ESLint - Added new eslint plugin for warning on enums.
* fix(enums-eslint): Enum Rule for ESLint - Changed based on suggestion.
Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>
* refactor(browser-platform-utils): Remove Deprecation and Fix Code - Changed usages of firefox to private and moved the usages to the preferred public method and removed the deprecations.
* fix(enums-eslint): Enum Rule for ESLint - Updated to error and added disable rules for all other places.
* fix(enums-eslint): Enum Rule for ESLint - Undid other changes by accident
* Remove usage of export-attachments feature flag
* Remove export-attachments feature flag definition
* Update export.command documentation
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
* Simplify if to reduce nesting
* Start subscribing to changes of the vaultSelector as soon as possible during ngOnInit
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.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>
* Migrate export from generator-legacy to generator-core
* Remove unused platformUtilsService
* Wire up password generation within ngOnInit
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.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
* [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
Extract core functionality from `libs/angular` to allow teams to depend on `libs/ui-common` instead.
Moves the following functionality to `ui-common`.
- `I18nPipe`. `libs/angular` still has an old copy but `components` depends on the new variant from `ui-common`.
- `safeProvider`, `SafeProvider` and `SafeInjectionToken`. `libs/angular`re-exports these to avoid needing to update all consumers.
Update all libs to use explicit dependencies rather than relying on tsconfig.libs.json. This allows us to more easily understand the dependencies between libs and prevent users from accidentally adding new dependencies.
We still use tsconfig.libs (now renamed tsconfig.spec) for tests.