Commit Graph

538 Commits

Author SHA1 Message Date
Vincent Salucci 15597fb4e9
[AC-1529] Update settings tab visibility to include device approvals (#5855)
* fix: update show org settings function, add explicit canManageDeviceApprovals helper, refs AC-1529

* fix: add device approval in org-redirect guard and update passed permission, refs AC-1529
2023-08-04 09:18:48 -05:00
Matt Gibson 36b7d30804
Fix failing crypto tests (#5948)
* Change everything to Uint8Array

related to https://github.com/jestjs/jest/issues/14379

* Work on failing type tests

* Revert changes to custom matcher setup

* Remove last BufferArrays from tests

* Fix custom matcher type errors in vscode

* Remove errant `.buffer` calls on Uint8Arrays

* Encryption Pair should serialize Array Buffer and Uint8Array

* Fix EncArrayBuffer encryption

---------

Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
2023-08-04 02:13:33 +00:00
Rui Tomé 72a6fa1f7d
[AC-1344] Provider users unable to bulk restore vault items for client organizations (#5259)
* [AC-1344] Simplified DeleteMany and SoftDeleteMany request creation

* [AC-1344] Added method putRestoreManyCiphersAdmin to apiService

* [AC-1344] Added method restoreManyWithServer to cipherService

* [AC-1344] Rewrote if statements and changed the method return type
2023-08-02 16:22:28 +01:00
aj-rosado 7ef2acc11a
[PM-2804] Migrate Send List to Component Library (#5796)
* Migrate Send list html to use Component Library and TailWind

* Added ComponentLibrary search module to Send

* Updated the No-Items on Send List to the new CL

* Added missing type on button at send.component.html

* Changed send to standalone component on web

* Moved no send icon to the consuming component

* removed unnecessary href on send component html

* Added sort to send list

* Removed SendComponent from loose-components module and added on app module

* Removed unnecessary click handler on send name button

* Created own file for no-send icon

* set icons folder as lowercase

* Corrected no-send.icon import

* Setting name as default sort on send list

* Added extra height to no-send.icon and removed classes from bit-no-items title container

* Removed the size small from options button
2023-07-31 12:04:33 +01:00
Conner Turnbull ab6085cd88
[AC-1562] Added region custom field to PayPal add credits (#5897)
* Added config service func for getting cloud region

* Updated to use `buildServerConfig`
2023-07-25 15:57:29 -04:00
Daniel James Smith b734edba14
Display importFormatError on failed to parse input (#5809) 2023-07-24 23:07:44 +00:00
Álison Fernandes 34533f62a9
[AC-1486] Feature: SM Billing Round 1 (#5747)
* [AC-1423] Update organization subscription cloud page (#5614)

* [AC-1423] Add ProgressModule to shared.module.ts

* [AC-1423] Update cloud subscription page styles

- Remove bootstrap styles
- Use CL components where applicable
- Use CL typography directives
- Update heading levels to prepare for new SM sections

* [AC-1423] Add usePasswordManager boolean to organization domain

* [AC-1423] Introduce BitwardenProductType enum

* [AC-1423] Update Organization subscription line items

- Add product type prefix
- Indent addon services like additional storage and service accounts
- Show line items for free plans

* [AC-1420] Add Secrets Manager subscribe component (#5617)

* [AC-1418] Add secrets manager manage subscription component (#5661)

* add additional properties (#5743)

* Allow autoscale limits to be removed, update naming (#5781)

* [AC-1488] Store Organization.SmServiceAccounts as total not additional (#5784)

* Allow autoscale limits to be removed, update naming

* Display additional service accounts only

* [AC-1531] Fix SM subscribe component not showing in free org billing tab (#5848)

---------

Co-authored-by: Shane Melton <smelton@bitwarden.com>
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
Co-authored-by: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com>
Co-authored-by: Rui Tome <rtome@bitwarden.com>
2023-07-24 18:07:21 -05:00
Danielle Flinn 159fea6962
[CL-99] Update icon-button.stories.ts (#5631)
* Update icon-button.stories.ts

separated out the icon-button stories by size, style, loading, and disabled

* restructured icon button docs to use new stories
2023-07-18 11:28:43 -04:00
Patrick H. Lauke 20228a485f
Fix typo `overlayPostition` > `overlayPosition` (#5530)
Co-authored-by: rr-bw <102181210+rr-bw@users.noreply.github.com>
2023-07-17 13:02:44 -07:00
Sammy Chang 906c11acb1
[PM-2043] Fix additional space and characters copied to clipboard (#5312)
* Change appSelectCopy to accept a dynamic input on what to copy

* Renamed select-copy directive to copy-text directive to be more accurate with the new behaviour

Signed-off-by: Andre Rosado <arosado@bitwarden.com>

* Moved CopyTextDirective on jslib module to be in alphabetic ordering

---------

Signed-off-by: Andre Rosado <arosado@bitwarden.com>
Co-authored-by: Andre Rosado <arosado@bitwarden.com>
2023-07-17 17:00:50 +01:00
Vincent Salucci c3adf96da7
fix: remove extra v2 within us/euUrls, refs AC-1518 (#5825) 2023-07-14 14:19:57 -05:00
Todd Martin b2374acc7f
[PM-3020] Change initialization of EnvironmentService to default to uninitialized (#5830)
* Set initialized to false on construction of the EnvironmentService

* Add initialization on browser and desktop.

* Added comments.
2023-07-14 15:10:47 -04:00
Oscar Hinton 79ed4ff83f
[PM-2237] Add tailwind to desktop & browser (#5326)
* Add tailwind to desktop

* Add tailwind to browser

* Toy around with using CL in desktop

* Move custom css into the tailwind theme

* Revert component experiment

* Add components to browser tsconfig

* Fix build
2023-07-14 15:03:42 -04:00
Oscar Hinton 62575336d5
Remove unused method (#5821) 2023-07-14 12:20:40 +02:00
Todd Martin baab72eaf2
Found another missing await. (#5819) 2023-07-13 11:23:04 -04:00
Todd Martin fbf67a819f
[PM-2846][PM-2860] Properly pass region from global to account state (#5764)
* Properly pass region from global to account state

* Fixed comment.

* Updated logic to not set environment if region with predefined URLs is selected.

* Added logic to clear environment URLs in EnvironmentService.

* Fixed comment
2023-07-12 10:44:55 -04:00
cd-bitwarden 04207647de
[SM-650] Updating search and select all to work together properly (#5510)
* Updating search and select all to work together properly

* adding comment and moving filtered data below private variables

* thomas suggested changes

* making service-accounts-list the same as projects and secrest list

* changes

* Update service-accounts-list.component.ts

* removing unnecessary code

* setting active filter on set data, adding comment

* removing unused field

* Update libs/components/src/table/table-data-source.ts

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

---------

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
2023-07-08 13:59:35 +00:00
Cesar Gonzalez b2e5f7de33
[PM-482] Desktop Application is Minimized When There is a Master Password Reprompt and Copying Vault Item Password (#5635) 2023-07-06 10:06:24 -05:00
Robyn MacCallum b737c70712
[PM-2067] Update Folder Add-Edit modal to use the Component Library (#5648)
* Add formGroup to base FolderAddEditComponent

* [web] use DialogService to open the modal

* [web] migrate FolderAddEditComponent use component library

* [desktop] use the formGroup in the template

* [browser] use the formGroup in the template

* [browser & desktop] remove disable on form invalid

* [web] Migrate to async actions

* [web] Strengthen typing for FolderAddEdit dialog

* Show form error instead of error toast

* Move browser folder add edit component to vault

* Remove extra template variables

* Remove inner form

* Remove inner form

* Update apps/web/src/app/vault/individual-vault/folder-add-edit.component.html

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

---------

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
2023-07-06 09:58:12 -04:00
Rui Tomé db2427e05c
[PM-2594] Replacing hardcoded cloud vault urls based on region obtained from ConfigService (#5629)
* [PM-2594] Added property "CloudVault" to EnvironmentServerConfigData and EnvironmentServerConfigResponse

* [PM-2594] Replaced hardcoded vault urls with value obtained from ConfigService

* [PM-2594] Renamed EnvironmentServerConfigResponse.cloudVault to cloudWebVault

* [PM-2594] Updated unit test with new property "cloudWebVault"

* [PM-2594] Added methods to get and set CloudWebVaultUrl on EnvironmentService. Configured ConfigurationService to set value based on cloudVaultRegion

* [PM-2594] Added JSDOC comments to methods getCloudWebVaultUrl and setCloudWebVaultUrl

* [PM-2594] Renamed EnvironmentServerConfigData.cloudVaultRegion to cloudRegion

* [PM-2594] Fixed unit test
2023-07-03 21:43:22 +01:00
Bernd Schoolmann f5c329030d
Make Argon2 WebAssembly module unload after use (#5072) 2023-07-03 07:12:42 -05:00
Todd Martin 3185c0a61b
[PM-2793] Modified bad base URL logic to not also catch web app (#5699)
* Modified bad base URL logic to not also catch web app.

* Removed EU from check.
2023-06-30 16:34:12 -04:00
André Bispo 05c4d172a7
[PM-142] Add environment selector to trial initiation (#5546) 2023-06-30 16:50:00 +01:00
Daniel James Smith 24d9ac88ba
[PM-1826] [PM-2168] [Tech debt] Migrate file-password-prompt to dialog (#5666)
* Migrate file-password-prompt to Dialog

* Fix issue with cancel/empty password returned

* Removed unneeded click handler to cancel dialog

* Added margin as requested by design

* Only apply margin to top of field

* Call submit when clicking on Import data

* Add form and and submit trigger
2023-06-29 20:59:17 +01:00
Will Martin 3b1860b9ee
[SM-771] bulk add SM dialog (#5669)
* add dialog; add service method; add menu button

* update service layer

* update service method; add i18n; add success and error logic

* remove comment

* remove SM Beta copy in member dialog

* refactor error logic to utilize bitAction

* update i18n key

* use i18n in menu option

* use i18n in footer

* rename component file

* rename enableAccess method; remove button; use userName pipe

* only show if SM flag is enabled

* [SM-830] fix: close checkboxes on dialog close
2023-06-29 12:42:27 -04:00
Andreas Coroiu a73525a80c
[PM-2135] [BEEEP] Refactor and refresh web user verification components (#5377)
* [PM-2135] feat: create new user-verification module

* [PM-2136] feat: add ability to remove form field bottom margin

(cherry picked from commit 05925ff77ed47f3865c2aecade8271390d9e2fa6)

* [PM-2135] feat: refactor user-verification component

* [PM-2135] feat: refactor user-verification-prompt

* [PM-2135] feat: use form validation in prompt

* [PM-2135] feat: change autofocus target

* [PM-2135] chore: clean up old code

* [PM-2135] feat: allow user verification to show invalid password error

* [PM-2135] feat: hack mark as touched to get error to display

* [PM-2135] chore: move to auth

* [PM-2135] fix: hardcoded dialog buttons

* [PM-2135] feat: add onDestroy handler

* [PM-2135] fix: remove unecessary directive input

* [PM-2135] feat: add password toggle

* [PM-2135] chore: add hack comment

* [PM-2135] chore: move services to auth folder and rename

* [PM-2135] fix: show correct error messages

* [PM-2135] fix: re-add non-existant files to whitelist

I honestly don't know why the linter is complaining about this

* Fix capital letters whitelist

* [PM-2135] chore: remove rows that were mistakenly added during merge from master

* [PM-2135] chore: remove rows that were mistakenly added during merge from master

* [PM-2135] feat: disable built-in browser validations

* Revert "[PM-2135] feat: disable built-in browser validations"

This reverts commit 969f75822a.

---------

Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
2023-06-28 09:02:22 -04:00
Danielle Flinn 6ef6140b29
Storybook docs (#5552)
* updated sort order

* Update preview.tsx

* Create avatar.mdx

Added avatar documentation based on Figma docs

* Added badge docs

* fixed typos

* added breadcrumb docs

* Added callout docs

* added color password docs

* Added dialog docs

* fixed typo

* Updated Dialogs docs

Added a dialogs.mdx page for general docs that apply to both main Dialogs and Simple Dialogs.

Updated the sub-docs pages

* Update simple-dialog.mdx

* Added documentation from Figma to Forms docs

* Create icon-button.mdx

* added link docs

* Added menu docs

* Added progress indicator docs

* Updated table docs

* Added tab docs

* Added toggle group docs

* Revert "Update preview.tsx"

This reverts commit 4671d9726a.

* added docs for appA11yTitle

* Fixed typos

* Update libs/components/src/link/link.mdx

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

* Update libs/components/src/menu/menu.mdx

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

* Addressed feedback

* Addressed feedback on callout, menu, and progress

* moved stories mdx files to proper location

* Addressed feedback on dialogs.mdx

* Update libs/components/src/tabs/tabs.mdx

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

* Addressed feedback on Tabs

* ran prettier

* Fixed title formatting

* ran prettier

* Update libs/components/src/dialog/dialogs.mdx

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

* ran prettier

---------

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
2023-06-27 12:46:44 -07:00
André Bispo c31504cab4
[PM-1593] send password as null if it is not in state (#5634) 2023-06-23 17:21:48 +01:00
André Bispo 4124f7bdc8
[PM-2676] Fix web set environment urls after state init (#5632)
* [PM-2676] Fix web set env urls after state init.

* [PM-2676] Add note to remove workaround
2023-06-20 20:44:46 +01:00
Rui Tomé d3d17f1496
[AC-1144] Warn admins when removing or revoking users without master password (#5494)
* [AC-1144] Added new messages for warning removing/revoking user without master password

* [AC-1144] Added property 'hasMasterPassword' to OrganizationUserUserDetailsResponse and OrganizationUserView

* [AC-1144] Added user's name to 'No master password' warning

* [AC-1144] Added property 'hasMasterPassword' to ProviderUserResponse

* [AC-1144] Added alert to bulk "remove/revoke users" action when a selected user has no master password

* [AC-1144] Moved 'noMasterPasswordConfirmationDialog' method to BasePeopleComponent

* [AC-1144] Removed await from noMasterPasswordConfirmationDialog

* [AC-1144] Changed ApiService.getProviderUser to output ProviderUserUserDetailsResponse

* [AC-1144] Added warning on removing a provider user without master password

* [AC-1144] Added "No Master password" warning to provider users

* [AC-1144] Added "no master password" warning when removing/revoking user in modal view

* [AC-1144] Reverted changes made to ProviderUsers

* [AC-1144] Converted showNoMasterPasswordWarning() into a property

* [AC-1144] Fixed issue when opening invite member modal
2023-06-16 16:38:55 +01:00
André Bispo 1052f00b87
[PM-2475][PM-2536] Clicking "US" in region selector sets base URL (#5604) 2023-06-16 14:09:16 +01:00
Vincent Salucci 5cd51374d7
[AC-1416] Expose Organization Fingerprint (#5557)
* refactor: change getFingerprint param to fingerprintMaterial, refs PM-1522

* feat: generate and show fingerprint for organization (WIP), refs AC-1416

* feat: update legacy params subscription to best practice (WIP), refs AC-1461

* refactor: update to use reactive forms, refs AC-1416

* refactor: remove boostrap specific classes and update to component library paradigms, refs AC-1416

* refactor: remove boostrap specific classes and update to component library paradigms, refs AC-1416

* refactor: create shared fingerprint component to redude boilerplate for settings fingerprint views, refs AC-1416

* refactor: use grid to emulate col-6 and remove unnecessary theme extensions, refs AC-1416

* refactor: remove negative margin and clean up extra divs, refs AC-1416

* [AC-1431] Add missing UserVerificationModule import (#5555)

* [PM-2238] Add nord and solarize themes (#5491)

* Fix simple configurable dialog stories (#5560)

* chore(deps): update bitwarden/gh-actions digest to 72594be (#5523)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* refactor: remove extra div leftover from card-body class, refs AC-1416

* refactor: use bitTypography for headers, refs AC-1416

* fix: update crypto service abstraction path, refs AC-1416

* refactor: remove try/catch on handler, remove bootstrap class, update api chaining in observable, refs AC-1416

* fix: replace faulty combineLatest logic, refs AC-1416

* refactor: simplify observable logic again, refs AC-1416

---------

Co-authored-by: Shane Melton <smelton@bitwarden.com>
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-15 21:03:48 -05:00
Shane Melton 0afbd90a2d
[AC-1192] Create new device approvals component for TDE (#5548)
* Add feature flag route guard and tests

* Add additional test for not showing error toast

* Strengthen error toast test with message check

* Cleanup leaking test state in platformService mock

* Negate if statement to reduce nesting

* Update return type to CanActivateFn

* Use null check instead of undefined

* Introduce interface to support different feature flag types

- Switch to observable pattern to access serverConfig$ subject
- Add catchError handler to allow navigation in case of unexpected exception
- Add additional tests

* Add additional test for missing feature flag

* Remove subscription to the serverConfig observable

Introduce type checking logic to determine the appropriately typed flag getter to use in configService

* [AC-1192] Create initial device approvals component and route

* [AC-1192] Introduce appIfFeature directive for conditionally rendering content based on feature flags

* [AC-1192] Add DeviceApprovals link in Settings navigation

* Remove align middle from bitCell directive

The bitRow directive supports alignment for the entire row and should be used instead

* [AC-1192] Add initial device approvals page template

* [AC-1192] Introduce fingerprint pipe

* [AC-1192] Create core organization module in bitwarden_license directory

* [AC-1192] Add support for new Devices icon to no items component

- Add new Devices svg
- Make icon property of bit-no-items an Input property

* [AC-1192] Introduce organization-auth-request.service.ts with related views/responses

* [AC-1192] Display pending requests on device approvals page

- Add support for loading spinner and no items component

* [AC-1192] Add method to bulk deny auth requests

* [AC-1192] Add functionality to deny requests from device approvals page

* [AC-1192] Add organizationUserId to pending-auth-request.view.ts

* [AC-1192] Add approvePendingRequest method to organization-auth-request.service.ts

* [AC-1192] Add logic to approve a device approval request

* [AC-1192] Change bitMenuItem directive into a component and implement ButtonLikeAbstraction

Update the bitMenuItem to be a component and implement the ButtonLikeAbstraction to support the bitAction directive.

* [AC-1192] Update menu items to use bitActions

* [AC-1192] Update device approvals description copy

* [AC-1192] Revert changes to bitMenuItem directive

* [AC-1192] Rework menus to use click handlers

- Wrap async actions to catch/log any exceptions, set an in-progress state, and refresh after completion
- Show a loading spinner in the header when an action is in progress
- Disable all menu items when an action is in progress

* [AC-1192] Move Devices icon into admin-console web directory

* [AC-1192] bit-no-items formatting

* [AC-1192] Update appIfFeature directive to hide content on error

* [AC-1192] Remove deprecated providedIn for OrganizationAuthRequestService

* [AC-1192] Rename key to encryptedUserKey to be more descriptive

* [AC-1192] Cleanup loading/spinner logic on data refresh

* [AC-1192] Set middle as the default bitRow.alignContent

* [AC-1192] Change default alignRowContent for table story

* [AC-1192] Rename userId to fingerprintMaterial to be more general

The fingerprint material is not always the userId so this name is more general

* [AC-1192] Remove redundant alignContent attribute

* [AC-1192] Move fingerprint pipe to platform
2023-06-15 14:53:21 -07:00
Daniel Chateau 9ed59c6fa9
Update request headers sent to AnonAddy API. (#5565) 2023-06-14 22:59:29 +02:00
Robyn MacCallum 2b65b3f0f7
[AC-1383] Move collections to Vault (#5424)
* Move CollectionDialog to Vault

* Fix CollectionDialogModule imports

* Move CollectionAdminService and View to Vault

* Move CollectionService to Vault

* Split GroupService into internal and public facing classes

* Move collection models to vault

* lint spacing fix

* Move collection spec file

* Fix spec import

* Update apps/web/src/app/core/core.module.ts

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>

* Remove CoreOrganizationModule from CollectionDialogModule

---------

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
2023-06-14 08:38:24 -04:00
Andreas Coroiu 37010a6414
[PM-2642] Fix feature flags not working properly when urls load from storage (#5598)
* fix: feature flags not working properly

Due to race conditions the api url is not set during the first fetch och server config. This causes the config to be fetched from `api.bitwarden.com`. The config is then supposed to be re-fetched when the api url is set by the environment service, but due to a missing line this is not done when the urls are set from storage.

* feat: change to `Observable<void>`
2023-06-14 14:10:39 +02:00
Daniel James Smith 3b708d9311
Remove try-catch to display proper api-errors (#5570) 2023-06-14 11:28:32 +02:00
Daniel James Smith 72a5ba455c
[PM-2367] [BEEEP]: Extract password strength from password-generation-service (#5502)
* Extract passwordStrength from passwordGenerationService

Extract passwordStrength from password-generation.service.ts
Create new password-strength.service.ts
Create new password-strength.service.abstraction.ts
Register new password-strength service
Fix usages in libs

* Fix usage in web

* Fix usage in desktop

* Fix usage in CLI

* Fix usage in browser

Move password-generation-factory to tools

* Fix tests

* Change dependency in jslib-services.module
2023-06-13 23:22:25 +02:00
Thomas Rittson 22caae116c
Restrict angular imports (#5597)
* Refactor restricted imports eslint rule, add angular deps

* Move FormValidationErrorsService into libs/angular

* Remove angular decorators from configService

* Remove angular decorator from anonymousHubService
2023-06-13 10:03:32 +10:00
Rui Tomé 0ab982038c
[AC-1088] Truncating collection names on Groups table (#5236)
* [AC-1088] Set no-wrap to 'select all' column on groups table

* [AC-1088] Using EllipsisPipe on GroupsComponent to truncate group names

* [AC-1088] Reverted using no-wrap on column header

* [AC-1088] Removed truncateCollectionNames

* [AC-1088] Added 'truncate' option to badge and badge-list components

* [AC-1088] Truncating collection names on groups component

* [AC-1088] Marked EllipsisPipe as deprecated

* [AC-1088] Removed EllipsisPipe from GroupsComponent

* [AC-1088] Added badge truncate to storybook stories

* [AC-1088] Setting badge css requirements for truncate

* [AC-1088] Added storybook stories for truncated badges

* [AC-1088] Set badges truncate default value to true

* [AC-1088] Set badges to use class tw-inline-block and tw-align-text-top

* [AC-1088] Set title on each badge list item if truncated

* [AC-1088] Set title on badge if truncated

* [AC-1088] Removed duplicate truncate on badge-list component

* [AC-1088] Swapped setting badge title from ngAfterContentInit to HostBinding

* [AC-1088] Configured badge stories to have the truncate option

* [AC-1088] Fixed badges tooltip to not include commas added for screen readers on badge lists

* [AC-1088] Added lengthy text to single badge on storybook

* [AC-1088] In badge-list moved the commas out from the badges

* [AC-1088] Removed irrelevant comment and moved the text align class next to other font classes
2023-06-12 10:56:03 +01:00
Thales Augusto c70d67bad3
[PM-1823] Defining the card brand according to its number (#5204)
* Defining the card brand according to its number

* Moving cardBrandByPatterns function to Card View

* Getting Card brand via cardBrandByPatterns function

* Changing cardBrandByPatterns method to static. See:
The reason being that someone wanting to use this outside of the onCardNumberChange would need to know to set the cc-number on the view-model before calling cardBrandByPatterns

* Defining the card brand according to its number on Desktop

* Defining the card brand according to its number on Web
2023-06-09 20:44:33 +02:00
Daniel James Smith ab260a3653
Fix broken import of misc/utils (#5586) 2023-06-09 11:12:20 +02:00
titanism d18b45a87e
[PM-1060] Added new forwarder (Forward Email <https://forwardemail.net>) (#4809)
* Added new forwarder (Forward Email <https://forwardemail.net>)

* fix: fixed Basic authorization header

* fix: fixed returned email value

* feat: added verbose message for end-users (e.g. "Not Found" vs. "Domain does not exist on your account." (automatically localized with i18n for user)

* fix: fixed Buffer.from to Utils.fromBufferToB64

* fix: fixed fromBufferToB64 to fromUtf8ToB64

* Remove try-catch to properly display api errors

---------

Co-authored-by: Daniel James Smith <djsmith@web.de>
2023-06-09 09:55:12 +02:00
Shane Melton c6be3fa19c
[AC-1437] Introduce Feature Flag route guard (#5465)
* Add feature flag route guard and tests

* Add additional test for not showing error toast

* Strengthen error toast test with message check

* Cleanup leaking test state in platformService mock

* Negate if statement to reduce nesting

* Update return type to CanActivateFn

* Use null check instead of undefined

* Introduce interface to support different feature flag types

- Switch to observable pattern to access serverConfig$ subject
- Add catchError handler to allow navigation in case of unexpected exception
- Add additional tests

* Add additional test for missing feature flag

* Remove subscription to the serverConfig observable

Introduce type checking logic to determine the appropriately typed flag getter to use in configService

* Update the feature flag to fallback to blocking the route on an unexpected exception

* Trigger test action

* Fix imports after merge with master
2023-06-08 09:12:52 -07:00
Jared Snider 806bd8d039
Tech-Debt - [PM-2283] - Update ConfigApiService getServerConfig call to send access token if it exists (#5464)
* PM-2283 - Update config api service get server config call to send authed when we have an access token so that LaunchDarkly on the server can properly acquire user context.

* PM-2283- Replace token service with Auth service per PR feedback

* PM-2283 - Refactor config api service get authed status based on PR feedback.

* PM-2283 - Fix import issues due to platform folder creation and file moves
2023-06-07 17:47:30 -04:00
Matt Gibson 78248db590
Platform/pm 19/platform team file moves (#5460)
* Rename service-factory folder

* Move cryptographic service factories

* Move crypto models

* Move crypto services

* Move domain base class

* Platform code owners

* Move desktop log services

* Move log files

* Establish component library ownership

* Move background listeners

* Move background background

* Move localization to Platform

* Move browser alarms to Platform

* Move browser state to Platform

* Move CLI state to Platform

* Move Desktop native concerns to Platform

* Move flag and misc to Platform

* Lint fixes

* Move electron state to platform

* Move web state to Platform

* Move lib state to Platform

* Fix broken tests

* Rename interface to idiomatic TS

* `npm run prettier` 🤖

* Resolve review feedback

* Set platform as owners of web core and shared

* Expand moved services

* Fix test types

---------

Co-authored-by: Hinton <hinton@users.noreply.github.com>
2023-06-06 15:34:53 -05:00
Oscar Hinton f24064fda5
Fix simple configurable dialog stories (#5560) 2023-06-06 09:39:48 +02:00
Oscar Hinton 2a9efb2ebe
[PM-2238] Add nord and solarize themes (#5491) 2023-06-06 09:35:13 +02:00
Todd Martin 23bd5de37c
Removed self-hosted restriction from Login with Device (#5441)
* Removed self-hosted restriction from Login with Device.

* Updated showPasswordless client-side flag to true for self-hosted.

* Linting

* Linting
2023-06-01 12:38:10 -04:00
Oscar Hinton 9e38a66df8
[PM-2362] Move select options to sso component (#5497) 2023-06-01 11:07:50 +02:00
Calum Lind 3f35b78b40
[PM-2256] Fix importer parsing credit card expiry year (#5444)
* Fix importer parsing credit card expiry year

When importing a credit card from Enpass it was found that with a 4
digit expiry year was prefixed with '20', stored at 11/202025 instead of
11/2025.

Fixed typo that checked length of month instead of year which
incorrectly added prefix.

* Refactor setCardExpiration to use RegExp
2023-05-31 09:08:39 +01:00
Shane Melton e092d42b72
[AC-1104] Fix access import/export with custom permission (#5014)
* [AC-1104] Allow importBlockedByPolicy to be overridden

Adjust the import component so that the importBlockedByPolicy flag can be overridden by the org import component to always return false.

* [AC-1104] Allow disabledByPolicy to be overridden in export component

Adjust the export component so that the disabledByPolicy flag can be overridden by the org export component to always return false.

* [AC-1104] Cleanup logic that disables export form

* [AC-1104] Use observable subscription for assigning importBlockedByPolicy flag

* [AC-1264] Add optional success callback for import component

Use the optional callback in org-import.component.ts to clear the file and file contents when the user does not have access to the vault page

* [AC-1264] Re-order properties

* [AC-1104] Refactor import component to only use onSuccess callback that can be overridden
2023-05-30 16:30:15 -07:00
Thomas Avery 2f44b9b0dd
[SM-628] Add trim validator to SM dialogs (#4993)
* Add trim validator to SM dialogs

* Swap to creating a generic component

* Swap to BitValidators.trimValidator

* Fix storybook

* update validator to auto trim whitespace

* update storybook copy

* fix copy

* update trim validator to run on submit

* add validator to project name in secret dialog; update secret name validation to on submit

---------

Co-authored-by: William Martin <contact@willmartian.com>
2023-05-30 18:52:02 -04:00
Oscar Hinton f7b372a0b0
[PM-2276] Upgrade Storybook to v7 (#5258) 2023-05-26 15:58:06 +02:00
Jared Snider 0fcfe883b5
Feature/[PM-1378] - Trusted Device Encryption - Establish trust logic for all clients (#5339)
* PM1378 - (1) Create state service methods for securely storing a device symmetric key while following existing pattern of DuckDuckGoKey generation (2) Create makeDeviceKey method on crypto service which leverages the new state service methods for storing the device key.

* PM-1378 - Document CSPRNG types w/ comments explaining what they are and when they should be used.

* PM-1378 - TODO to add tests for makeDeviceKey method

* PM-1378 - Create Devices API service for creating and updating device encrypted master keys + move models according to latest code standards ( I think)

* PM-1378 - TODO clean up - DeviceResponse properly moved next to device api service abstraction per ADR 0013

* PM-1378 - CryptoService makeDeviceKey test written

* PM-1378 - Tweak crypto service makeDeviceKey test to leverage a describe for the function to better group related code.

* PM-1378 - Move known devices call out of API service and into new devices-api.service and update all references. All clients building.

* PM-1378 - Comment clean up

* PM-1378 - Refactor out master key naming as that is a reserved specific key generated from the MP key derivation process + use same property on request object as back end.

* PM-1378 - Missed a use of master key

* PM-1378 - More abstraction updates to remove master key.

* PM-1378 - Convert crypto service makeDeviceKey into getDeviceKey method to consolidate service logic based on PR feedback

* PM-1378- Updating makeDeviceKey --> getDeviceKey tests to match updated code

* PM-1378 - Current work on updating establish trusted device logic in light of new encryption mechanisms (introduction of a device asymmetric key pair in order to allow for key rotation while maintaining trusted devices)

* PM-1378 - (1) CryptoService.TrustDevice() naming refactors (2) Lots of test additions and tweaks for trustDevice()

* PM-1378 - Updated TrustedDeviceKeysRequest names to be consistent across the client side board.

* PM-1378 - Move trusted device crypto service methods out of crypto service into new DeviceCryptoService for better single responsibility design

* PM-1378 - (1) Add getDeviceByIdentifier endpoint to devices api as will need it later (2) Update TrustedDeviceKeysRequest and DeviceResponse models to match latest server side generic encrypted key names

* PM-1378 - PR feedback fix - use JSDOC comments and move from abstraction to implementation

* PM-1378 - Per PR feedback, makeDeviceKey should be private - updated tests with workaround.

* PM-1378- Per PR feedback, refactored deviceKey to use partialKey dict so we can associate userId with specific device keys.

* PM-1378 - Replace deviceId with deviceIdentifier per PR feedback

* PM-1378 - Remove unnecessary createTrustedDeviceKey methods

* PM-1378 - Update device crypto service to leverage updateTrustedDeviceKeys + update tests

* PM-1378 - Update trustDevice logic - (1) Use getEncKey to get user symmetric key as it's the correct method and (2) Attempt to retrieve the userSymKey earlier on and short circuit if it is not found.

* PM-1378 - Replace deviceId with deviceIdentifier because they are not the same thing

* PM-1378 - Per PR feedback, (1) on web/browser extension, store device key in local storage under account.keys existing structure (2) on desktop, store deviceKey in secure storage. (3) Exempt account.keys.deviceKey from being cleared on account reset

* PM-1378 - Desktop testing revealed that I forgot to add userId existence and options reconciliation checks back

* PM-1378 - Per discussion with Jake, create DeviceKey custom type which is really just an opaque<SymmetricCryptoKey> so we can more easily differentiate between key types.

* PM-1378 - Update symmetric-crypto-key.ts opaque DeviceKey to properly setup Opaque type.

* PM-1378 - Fix wrong return type for getDeviceKey on DeviceCryptoServiceAbstraction per PR feedback
2023-05-25 14:17:19 -04:00
André Bispo b9d3b0aff7
[PM-2398] Fix firefox extension environments bug (#5514) 2023-05-25 18:32:26 +01:00
André Bispo 1a9a328d39
[PM-2347] Refresh configs when environment urls change (#5507)
* [PM-2347] Re fetch feature flags when environment urls change and update UI.
2023-05-25 14:38:23 +01:00
Jared Snider 134b07f439
PM-2373 - Fix hang for desktop and browser by removing await from onSuccessfulLogin() call as it was waiting for a full sync to finish before navigating to the vault which let the user see that the loginTwoFactor method had completed and the loading state of the component was "finished" even though it wasn't. Confirmed that the fix from PM-687 still works to allow an emergency contact to sign in via SSO after removing the await. (#5508) 2023-05-24 16:05:48 -04:00
André Bispo 946d254b0f
[PM-2347] Fix EU env flag (#5495) 2023-05-22 18:04:50 -04:00
Oscar Hinton 62591a8bc8
[PM-2328] Fix jest deprecations (#5483) 2023-05-22 20:19:16 +02:00
André Bispo b9fe78796a
[PM-1019] Environment selection clients (#5480)
* [PM-169][PM-142][PM-191] Add Environments to Web and Desktop (#5294)

* [PM-1351] Add property to server-config.response. Change config to be able to fetch without being authed.

* [PM-1351] fetch every hour.

* [PM-1351] fetch on vault sync.

* [PM-1351] browser desktop fetch configs on sync complete.

* [PM-1351] Add methods to retrieve feature flags

* [PM-1351] Add enum to use as key to get values feature flag values

* [PM-1351] Remove debug code

* [PM-1351] Get flags when unauthed. Add enums as params. Hourly always fetch.

* [PM-1351] add check for authed user using auth service

* [PM-169] Web: add drop down to select environment

* [PM-169] Fix pop up menu margins. Add DisplayEuEnvironmentFlag.

* [PM-169] Change menu name.

* [PM-169] Add environment selector ts and html. Add declaration and import on login.module

* [PM-169] Add environment selector to desktop.

* [PM-169] Ignore lint error.

* [PM-169] add takeUntil to subscribes

* [PM-191] PR Fixes, code format

* [PM-168] Add Environments to extension login/registration (#5434)
2023-05-19 17:35:42 +01:00
renovate[bot] 9e32f8d574
chore(deps): update dependency rimraf to v5 (#5468)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Hinton <hinton@users.noreply.github.com>
2023-05-19 14:23:44 +02:00
Shane Melton 3f7a63b2c6
[PM-2102] Implement logic to keep row control enable/disable status in sync with the access item properties whenever the parent control is enabled/disabled (#5433)
Angular 15 introduced a breaking change that calls setDisabledState() whenever a CVA is added. This was re-enabling all the internal form group rows (even those that should have remained disabled).
2023-05-18 10:32:18 -07:00
Oscar Hinton 3da7fc7cb3
Deprecated broadcaster (#5461) 2023-05-17 12:27:27 +02:00
Oscar Hinton 0d9345db8f
[PM-2194] Tweak the CL search inputs reset button (#5409) 2023-05-16 20:23:16 +02:00
Daniel García 8e61184c0f
[PM-2197] Fix memory leaks in Safari (#5451)
* Remove reference cycle between ThemingService and the global window object

* Deregister messageListeners on a safari popup to avoid mem leaks

* Use pagehide event instead of unload
2023-05-16 16:26:01 +02:00
Matt Gibson c58b0c0753
Return error code when any tsc typecheck fails (#5459)
* Return error code when any tsc typecheck fails

* Try with bash

`sh ./scripts/test-types.s` resulted in errors missing `[[`,
which is a bash builtin. It's possible the ubuntu runner is using
some other shell.

* Fix spec type errors

* Switch to node for Windows compatibility
2023-05-16 09:20:40 -05:00
Shane Melton bcda04ee86
[AC-358] SelfHosted update subscription page (#5101)
* [AC-358] Add selfHostSubscriptionExpiration property to organization-subscription.response.ts

* [AC-358] Update selfHost org subscription template

- Replace "Subscription" with "SubscriptionExpiration"
- Add question mark help link
- Add helper text for grace period
- Add support for graceful fallback in case of missing grace period in subscription response

* Update libs/common/src/billing/models/response/organization-subscription.response.ts

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>

* [AC-358] Remove unnecessary hypen

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>

* [AC-358] Introduce SelfHostedOrganizationSubscription view
- Encapsulate expiration/grace period logic in the new view object.
- Remove API response getters from the angular component
- Replace the API response object with the new view

* [AC-358] Clarify name for new expiration without grace period field

* [AC-358] Update constructor parameter name

* [AC-358] Simplify new selfhost subscription view

- Make expiration date properties public
- Remove obsolete expiration date getters
- Update the component to use new properties
- Add helper to component for determining if the subscription should be rendered as expired (red text)

* [AC-358] Rename isExpired to isExpiredAndOutsideGracePeriod to be more explicit

---------

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
2023-05-15 07:38:53 -07:00
aj-rosado 44fd063dc1
[PM-2054] Updated Password Generator History to use Component Library on Web (#5414)
* [PM-2054] Updated Password Generator History to use Component Library

* [PM-2054] Corrected paddings

* [PM-2054] Added missing type to buttons

* [PM-2054] Removed unused imports and run prettier

* [PM-2054] Swap list by bit-table
2023-05-15 12:01:28 +01:00
Shane Melton ab4d8df2ae
[AC-1145] Add trusted devices option to encryption settings on sso config (#5383)
* [AC-1145] Add TDE feature flag

* [AC-1145] Update sso-config to use new member decryption type and remove keyConnectorEnabled

* [AC-1145] Add new TDE option to SSO config form and update to CL radio buttons

* [AC-1145] Update checkboxes to CL checkboxes

* [AC-1145] Fix messages.json warning

* [AC-1145] Update to new form async actions

* [AC-1145] Modify key connector option display logic to check for TDE feature flag

* [AC-1145] Remove obsolete app-checkbox component

* [AC-1145] Update TDE option description to refer to master password reset policy
2023-05-10 12:51:56 -07:00
Oscar Hinton 5f825e10f9
[PM-2132] Move all specs to the src directory (#5367) 2023-05-09 11:27:09 +02:00
Oscar Hinton 96ba8b3233
[PM-1950] Add support for a loading state in dialogs (#5268) 2023-05-09 11:26:13 +02:00
Oscar Hinton d53f79e325
Update CL documentation (#5379) 2023-05-08 14:46:59 +02:00
Andreas Coroiu e13dd1dfef
feat: tweak error onBlur/touched/untouched behavior (#5292) 2023-05-08 08:25:14 +02:00
Oscar Hinton d8b8bf5218
[PM-2136] Change banner button to use bitLink (#5378) 2023-05-05 17:13:54 +02:00
Jared Snider 6b26406331
Defect/PM-1196 - SSO with Email 2FA Flow - Email Required error fixed (#5280)
* PM-1196- First draft of solution for solving SSO login with email 2FA not working; this is a working solution but we need to leverage it to build a better solution with a different server generated token vs a OTP.

* PM-1196 - Swap from OTP to SSO Email 2FA session token. Working now, but going to revisit whether or not email should come down from the server. Need to clean up the commented out items if we decide email stays encrypted in the session token.

* PM-1196 - Email needs to come down from server after SSO in order to flow through to the 2FA comp and be sent to the server

* PM-1196 - For email 2FA, if the email is no longer available due to the auth service 2 min expiration clearing the auth state, then we need to show a message explaining that (same message as when a OTP is submitted after expiration) vs actually sending the request without an email and getting a validation error from the server

* PM-1196 - (1) Make optional properties optional (2) Update tests to pass (3) Add new test for Email 2FA having additional auth result information

* PM-1196 - Remove unnecessary optional chaining operator b/c I go my wires crossed on how it works and the login strategy is not going to be null or undefined...
2023-05-04 14:57:11 -04:00
Oscar Hinton 20d40a0388
[PM-2087] Bump tailwind and prettier-plugin-tailwindcss (#5320) 2023-05-04 17:02:45 +02:00
Jared Snider 120fd14213
Remove all TypeScript region use as it is now against the Bitwarden code style guide. (#5356) 2023-05-04 10:48:01 -04:00
Jared Snider 18b2c60ef8
Clean up TODO from Org Domain claiming by adding test for getClaimedOrgDomainByEmail (#5355) 2023-05-04 09:56:46 -04:00
SmithThe4th 50eea96ec5
[PM-1699] Updated low kdf iterations warning (#5170)
* updated low ksf iterations warning

* Removed test implementation

* Removed unused translation and updated key

* Enabled low kdf on this branch for testing

* Removed duplicate showKdf initialiazation

* [PM-1700] Put KDF warning behind a LaunchDarkly Feature Flag (#5308)

* Added feature flag for low kdf iteration

* Added feature flag implementation to component

* Renamed feature flag to align with what is setup on LaunchDarkly
2023-05-04 09:46:12 -04:00
Oscar Hinton c2278c082c
[PM-2104] Resolve dialog defects (#5357) 2023-05-04 13:52:08 +02:00
Oscar Hinton 4e1867682f
[PM-1504] Migrate Dialogs to DialogService (#5013)
This PR introduces a generic `DialogService` which can be used by all the clients. This allows us to decouple dialogs from the `PlatformUtilsHelper`.

The `DialogService` provides a new method, `openSimpleDialog` which is the new interface for that type of dialogs.

This gives us 3 different implementations: 
- Web: DialogService modern dialogs
- Browser: SweetAlert
- Desktop: Native electron based
2023-05-02 18:46:03 +02:00
renovate[bot] 7c4b2c04b9
[PM-1905] Update npm (#3940)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Hinton <hinton@users.noreply.github.com>
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
2023-05-02 17:25:25 +02:00
Oscar Hinton f37ff09e10
[PM-1915] Remove selector for all dialogs (#5257) 2023-05-01 17:59:47 +02:00
Oscar Hinton 01c1bd0710
[PM-1913] Add base styling to dialog footer component (#5254) 2023-05-01 11:11:39 +02:00
Robyn MacCallum 671a9115bb
[PM-1400] Update IconComponent to use OnPush ChangeDetection (#5181)
* Add disableFavicon$ to stateService

* Change IconComponent's ChangeDetectionStrategy and use disableFavicon$ observable

* Only get first result from disableFavicon observable

* Move disabledFavicon$ to SettingsService

* Update usage of disableFavicon to use SettingsService

* Remove getting and setting of disabledFavicon on login

* Settings service observable adjustments

* Fix for popup initially having a null value for the disableFavicon setting in settingsService

* Move disabledFavicon$ subscription to ngOnInit

* feat: experiment with observables

* Remove SettingsService from browser app component

* Fix storybook changes

* Update apps/web/src/app/vault/components/vault-items/vault-items.stories.ts

Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>

* Fix mock function signature

---------

Co-authored-by: Andreas Coroiu <andreas.coroiu@gmail.com>
Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>
2023-04-28 15:07:26 -04:00
aj-rosado 525de3bfd2
[PM-730] Corrected EventType when copying password (#5229)
* [PM-730] Corrected EventType when copying password

* [PM-730] Corrected copy password and totp events
2023-04-27 16:46:48 +01:00
André Bispo cfc380c697
[PM-1349] Update client service to retrieve feature flags from API (#5064)
* [PM-1351] Add property to server-config.response. Change config to be able to fetch without being authed.

* [PM-1351] fetch every hour.

* [PM-1351] fetch on vault sync.

* [PM-1351] browser desktop fetch configs on sync complete.

* [PM-1351] Add methods to retrieve feature flags

* [PM-1351] Add enum to use as key to get values feature flag values

* [PM-1351] Remove debug code

* [PM-1351] Get flags when unauthed. Add enums as params. Hourly always fetch.

* [PM-1351] add check for authed user using auth service

* [PM-1351] remove unnecessary timer on account unlock
2023-04-26 15:30:39 +01:00
Jake Fink dfe69f77f5
[PM-687] emergency access invite lost during sso (#5199)
* [PM-687] refactor observable in base accept component

* [PM-687] add emergency access invitation to global state

* [PM-687] save invite to state and check on login

* [PM-687] move emergency access check above queryParams observable
2023-04-26 08:47:35 -04:00
Jim Hays 9f7bf1132b
[PM-1877] Spellcheck (#5237)
* Bug fix: "vaule" -> "value"

* Bug fix: "aria-descibedby" -> "aria-describedby"

* Bug fix: "chararacter" -> "character"

* Fix typos in comments

* Fix typos in documentation

* Fix typo in test description

* Fix typos in sample data: "childen" -> "children"

* Fix typos in sample data: "pargraphs" -> "paragraphs"

* Fixes to test data: "Additinoal", "Informaion" -> "Additional", "Information"

* Fix typo in test data: "dolhpin" -> "dolphin"

* Fix typo in local variable: "attachement" -> "attachment"

* Fix typo in method name: "detachOrganizastion" -> "detachOrganization"

* Fix typo in method name: "getNewlyAddedDomians" -> "getNewlyAddedDomains"

* Fix typo: "EncyptedMessageResponse" -> "EncryptedMessageResponse"

* Fix typo: "miliseconds" -> "milliseconds"

* Fix typo: "authResponsePushNotifiction" -> "authResponsePushNotification"

* Fix typo: "getPushNotifcationObs" -> "getPushNotificationObs"

* Fix typo: "ExpriationDate" -> "ExpirationDate"

* Fix typo: "OrganizationUserResetPasswordDetailsReponse" -> "OrganizationUserResetPasswordDetailsResponse"

* Fix typo: "DISPLAY_TITLE_ATTRIBUE" -> "DISPLAY_TITLE_ATTRIBUTE"

* Fix typo: "credentialretreivalCommandHandler" -> "credentialRetrievalCommandHandler"

* Fix typo: "buildLoginCredntials" -> "buildLoginCredentials"

* Fix typo: "_mappedCredentialsColums" -> "_mappedCredentialsColumns"

* Fix typo: "_mappedPersonalInfoAsIdentiyColumns" -> "_mappedPersonalInfoAsIdentityColumns"

* Fix typo in input name: "StroageGbAdjustment" -> "StorageGbAdjustment"

* Fix typo in const: "encryptionAlogrithm" -> "encryptionAlgorithm"

---------

Co-authored-by: Daniel James Smith <djsmith@web.de>
2023-04-26 12:16:07 +02:00
Oscar Hinton 76673ebe8b
[PM-1541] Adjust the dialogs max-width (#5036) 2023-04-25 16:45:35 +02:00
Jared Snider 85277aa2f8
AC-1267 - (1) Mark master pass (MP) field as untouched on any load of MP section of login page post email validation in order to prevent validation errors of "input required" from being shown prematurely before the user has entered anything or lost focus on the input when the user hits enter on the login screen after entering an email (2) Improve the logic around the MP autofocus to match existing code patterns to ensure there are no possible scenarios in which the MP would not be autofocused. (#5246) 2023-04-25 10:08:58 -04:00
Shane Melton e777842191
[AC-1343] Add bool parameter to conditionally evaluate password after successful unlock (#5260) 2023-04-21 14:40:56 -07:00
Rui Tomé 89c8c48cd4
[AC-1340] Fixed cipher restore for provider users by using the restore-admin endpoints (#5255) 2023-04-21 12:22:34 +01:00
Rui Tomé aacabf5bdf
[AC-1340] [Defect] Provider users unable to delete vault items for client organizations (#5242)
* [AC-1340] Calling Cipher DeleteAdmin endpoints when user has canEditAnyCollection permission

* [AC-1340] Fixed CLI and Desktop builds

* [AC-1340] Changed CipherService delete methods parameter 'orgAdmin' to 'asAdmin' and to nullable

* [AC-1340] Changed variable names from 'orgAdmin' to 'asAdmin'

* [AC-1340] Reverted change on DeleteCommand
2023-04-20 16:33:29 +01:00
Oscar Hinton 8c22fd74fc
[PM-1828] Fix typo in table component (#5206) 2023-04-20 10:14:02 +02:00
Oscar Hinton 68b62e73f1
[SM-645] Use search component in secrets manager (#4991)
* Move search component into the component library

* Migrate search fields

* Reshuffle imports slightly

* Remove export input module

---------

Co-authored-by: cd-bitwarden <106776772+cd-bitwarden@users.noreply.github.com>
2023-04-19 16:21:57 -04:00
Daniel James Smith 192bb5a7b3
[PM-328] Move exporter to tools (#5070)
* Create and register new libs/exporter

Create package.json
Create tsconfig
Create jest.config
Extend shared and root tsconfig and jest.configs
Register with eslint

* Migrate exportService to libs/exporter

Move exportService (abstraction and impl) into libs/exporter
Refactored exportService to be split into vault-export and event-export
Created barrel-files for both exports
Moved export.service.spec.ts into vault-export
Created an export-helper, which helps build the filename (extract method refactor from ExportService)

* Move components in libs/angular into tools-subfolder

Moved components
Updated imports in jslib-services.module and jslib.module

* Register libs/exporter with browser and fix imports

Move export.component into tools-subfolder

* Register libs/exporter with cli and fix imports

Move export.command into tools-subfolder

* Register libs/exporter with desktop and fix imports

Move export.component into tools-subfolder

* Move export models to libs/exporter

* Update web imports

* Update package-lock.json

* Move export models back as it would create circular dependency

Reponse models in common rely on export models which are in libs/exporter, which relies on common

* Fix up web for event-export

* Update CODEOWNERS

* Add export-models to team-tools-dev

* Simplify domain import

* Moving EventExport into web
2023-04-19 11:30:46 +02:00
Matt Gibson 830af7b06d
Rework Desktop Biometrics (#5234) 2023-04-18 09:09:47 -04:00
Andrew Jorgensen d77f77cea9
[PM-1803] Fail on unsupported export format (#5197)
* Fail on unsupported export format

Issue #5194: https://github.com/bitwarden/clients/issues/5194

The cli previously would take any value for the export format and
default to unencrypted json if it wasn't a supported format. This
behavior is a little dangerous because if for instance typed
"json_encrypted" instead of "encrypted_json" and naively saved the file
you might be surprised to learn the payload was not actually encrypted
even though the command completed successfully.

This change adds a guard clause when converting the string value passed
in via `--format` into the type `ExportFormat` to ensure that the format
provided is one of the supported types.

* Move isSupportedExportFormat to private method
2023-04-17 21:54:03 +02:00