1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-06-30 11:15:36 +02:00
Commit Graph

491 Commits

Author SHA1 Message Date
Thomas Rittson
b89f31101f
[AC-1512] Feature: Secrets Manager billing - round 2 (#5854)
* [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-1423] Simply sort function

* [AC-1423] Remove header border

* [AC-1423] Make "Password Manager" the default fallback for product name

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

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

* [AC-1423] Add minWidth input to bit-progress component

* [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-1423] Simply sort function

* [AC-1423] Remove header border

* [AC-1423] Remove redundant condition

* [AC-1423] Remove ineffective div

* [AC-1423] Make "Password Manager" the default fallback for product name

* Revert "[AC-1423] Add minWidth input to bit-progress component"

This reverts commit 95b2223a30.

* [AC-1423] Remove minWidth attribute

* [AC-1423] Switch to AddonProductType enum instead of boolean

* Revert "[AC-1423] Switch to AddonProductType enum instead of boolean"

This reverts commit 204f64b4e7.

* [AC-1423] Tweak sorting comment

* [AC-1418] Add initial SecretsManagerAdjustSubscription component

* [AC-1418] Add initial SM adjustment form

* [AC-1418] Adjust organization-subscription-update.request.ts to support both PM and SM

* [AC-1418] Rename service account fields in the options interface

* [AC-1418] Add api service call to update SM subscription

* [AC-1418] Cleanup form html

* [AC-1418] Add missing SM plan properties

* [AC-1418] Add SM subscription adjust form and logic to hide it

* [AC-1418] Add better docs to options interface

* [AC-1418] Fix conflicting required/optional labels for auto-scaling limits

* [AC-1418] Adjust labels and appearance to better match design

* [AC-1418] Use the SM plan for billing interval

* [AC-1418] Hide SM billing adjustment component behind feature flag

* [AC-1418] Update request model to match server

* [AC-1418] Cleanup BitwardenProductType after merge

Add to barrel file and update applicable imports.

* [AC-1418] Revert change to update PM subscription request model

* [AC-1418] Add new update SM subscription request model

* [AC-1418] Add new service method to update SM subscription

* [AC-1418] Use new model and service method

* [AC-1418] Cleanup SM subscription UI flags

* [AC-1418] Move SM adjust subscription component into SM billing module

* [AC-1418] Update SM seat count minimum to 1

* [AC-1418] Add missing currency codes

* [AC-1418] Simplify monthly price calculation

* [AC-1418] Increase PM adjust subscription form input width

* [AC-1418] Add check for null subscription

---------

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

* add the 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

---------

Co-authored-by: Shane Melton <smelton@bitwarden.com>

* [AC-1473] SM beta ending callout (#5719)

* [AC-1423] Add minWidth input to bit-progress component

* [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-1423] Simply sort function

* [AC-1423] Remove header border

* [AC-1423] Remove redundant condition

* [AC-1423] Remove ineffective div

* [AC-1423] Make "Password Manager" the default fallback for product name

* Revert "[AC-1423] Add minWidth input to bit-progress component"

This reverts commit 95b2223a30.

* [AC-1423] Remove minWidth attribute

* [AC-1423] Switch to AddonProductType enum instead of boolean

* Revert "[AC-1423] Switch to AddonProductType enum instead of boolean"

This reverts commit 204f64b4e7.

* [AC-1423] Tweak sorting comment

* [AC-1418] Add initial SecretsManagerAdjustSubscription component

* [AC-1418] Add initial SM adjustment form

* [AC-1418] Adjust organization-subscription-update.request.ts to support both PM and SM

* [AC-1418] Rename service account fields in the options interface

* [AC-1418] Add api service call to update SM subscription

* [AC-1418] Cleanup form html

* [AC-1418] Add missing SM plan properties

* [AC-1418] Add SM subscription adjust form and logic to hide it

* [AC-1418] Add better docs to options interface

* [AC-1418] Fix conflicting required/optional labels for auto-scaling limits

* [AC-1418] Adjust labels and appearance to better match design

* [AC-1418] Use the SM plan for billing interval

* [AC-1418] Hide SM billing adjustment component behind feature flag

* [AC-1418] Update request model to match server

* [AC-1418] Cleanup BitwardenProductType after merge

Add to barrel file and update applicable imports.

* [AC-1418] Revert change to update PM subscription request model

* [AC-1418] Add new update SM subscription request model

* [AC-1418] Add new service method to update SM subscription

* [AC-1418] Use new model and service method

* [AC-1418] Cleanup SM subscription UI flags

* [AC-1418] Move SM adjust subscription component into SM billing module

* [AC-1418] Update SM seat count minimum to 1

* [AC-1418] Add missing currency codes

* [AC-1418] Simplify monthly price calculation

* add daysRemaining util function and unit tests

* [AC-1474] update organization models to include SM beta flag

* add SM beta callout to org subscription page

* update messages.json

* remove beta field from profile org response

* improve daysRemaining code clarity

* set SM beta in org model constructor

* tweak free SM row visibility

* refactor callout description

* Revert "remove beta field from profile org response"

This reverts commit 6c6249e1ec.

* fix dates

* [AC-1468]: hide adjust SM component if beta user

* add sm beta field to org sub response; remove everywhere else

* fix copy

---------

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>

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

Also:

* Fix spacing in layout

* Send zero values for free plans

* Fix: properly delete enroll component

* remove the beta end message for free org (#5877)

* [AC-1458] Update local organization data after subscribing to Secrets Manager (#5888)

* [AC-1567] Fix max additional service account cost estimate (#5923)

* Fix max additional service account cost estimate

* Update i18n string ref

* Make i18n string keys consistent

* [AC-1461] Secrets Manager seat autoscaling cleanup (#5924)

* Remove unused return value from putOrganizationUserBulkEnableSecretsManager

* Fix service account limit validator (#5926)

* Updated Utils.daysRemaining method to calculate result using Math.floor and updated unit tests.

---------

Co-authored-by: Shane Melton <smelton@bitwarden.com>
Co-authored-by: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com>
Co-authored-by: Rui Tome <rtome@bitwarden.com>
Co-authored-by: Will Martin <contact@willmartian.com>
Co-authored-by: Álison Fernandes <vvolkgang@users.noreply.github.com>
Co-authored-by: Rui Tomé <108268980+r-tome@users.noreply.github.com>
2023-08-04 17:52:55 -04:00
rr-bw
dad6fedebd
[PM-3294][PM-3293] Update Region Selector Domains (#5949)
* update desktop domains

* update web domains

* remove old translations from desktop

* update translations on browser

* change 'Region' to 'Server' on web

* change labels

* remove 'region' translation

* adjust alignmend so 'Self-hosted' label lines up with others

* adjust width and layout of trial-initiation header to accomodate longer text
2023-08-04 14:28:55 -07:00
Jason Ng
8613b83d98
PM-238 Master Reprompt Enabled Appears on Item in Organization (#5858)
* add-edit components and cipher service updated for organization item saveCiphers
* update cipher service spec file
2023-08-04 11:45:32 -04:00
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