1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-02-16 01:21:48 +01:00
Commit Graph

2069 Commits

Author SHA1 Message Date
Bernd Schoolmann
2f8a7a95bd
[PM-15994] Move encrypt service to km ownership (#13220)
* 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
2025-02-05 17:39:11 +01:00
Daniel James Smith
f6eb08c3b7
Rename @bitwarden/importer/core to @bitwarden/importer-core (#13182)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-02-05 08:31:12 -06:00
cyprain-okeke
586cbccdef
Remove the feature flag (#13102) 2025-02-05 09:18:31 +01:00
Jordan Aasen
2c118d9f01
[PM-16925] - fix all restricted imports in vault (#13236)
* fix all restricted imports in vault

* fix spec

* remove export
2025-02-04 14:26:03 -08:00
Nick Krantz
aa024b419c
[PM-12571][PM-13807] Add/Edit Folder Dialog (#12487)
* move `add-edit-folder` component to `angular/vault/components` so it can be consumed by other platforms

* add edit/add folder copy to web app copy

* add extension refresh folder dialog to individual vault

* adding folder delete message to the web

* add deletion result for add/edit folder dialog

* allow editing folder from web

* fix strict types for changed files

* update tests

* remove border class so hover state shows

* revert changes to new-item-dropdown-v2

* migrate `AddEditFolderDialogComponent` to `libs/vault` package

* add Created enum type

* add static open method for folder dialog

* add fullName to `FolderFilter` type

* save the full name of a folder before splitting it into parts

* use the full name of the folder filter when available

* use a shallow copy to edit the folder's full name

---------

Co-authored-by: SmithThe4th <gsmith@bitwarden.com>
2025-02-04 15:13:13 -06:00
Jordan Aasen
a9f24b6d24
[PM-15938] - Restrict viewing hidden input based on permission (#13016)
* allow string or boolean disabled prop in input directive

* fix tests

* add test

* disable custom fields in partial edit

* disable custom fields in partial edit

* manually disable inputs

* revert changes to directive

* revert other changes

* remove unnecessary check for partial-edit
2025-02-04 12:59:25 -08:00
Jason Ng
327aed9763
[PM-11162] Assign To Collections Permission Update (#11367)
Only users with Manage/Edit permissions will be allowed to Assign To Collections. If the user has Can Edit Except Password the collections dropdown will be disabled.
---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
Co-authored-by: kejaeger <138028972+kejaeger@users.noreply.github.com>
2025-02-04 15:44:59 -05:00
Alex Morask
f9efbf0a6a
Update feature flag name (#13243) 2025-02-04 15:14:54 -05:00
Patrick-Pimentel-Bitwarden
0523ce0b40
refactor(active-user-state-refactor): [PM-12040] Remove ActiveUserStatus For SSO Login Component (#13149)
* refactor(active-user-state-refactor): [PM-12040] Remove ActiveUserState from SSO Service - First pass of work to update the state. In the middle of testing.

* fix(active-user-state-refactor): [PM-12040] Remove ActiveUserState from SSO Service - Fix for jslib-services.module.ts

* fix(active-user-state-refactor): [PM-12040] Remove ActiveUserState from SSO Service - Fix main.background.ts

* test(active-user-state-refactor): [PM-12040] Remove ActiveUserState from SSO Service - Added simple tests

* fix(active-user-state-refactor): [PM-12040] Remove ActiveUserState from SSO Service - Tiny touchups.

* fix(active-user-state-refactor): [PM-12040] Remove ActiveUserState from SSO Service - Few fixes to resolve comments.

* fix(active-user-state-refactor): [PM-12040] Remove ActiveUserState from SSO Service - Changed place where userId is loaded.

* test(active-user-state-refactor): [PM-12040] Remove ActiveUserState from SSO Service - Fixed test.
2025-02-04 13:31:36 -05:00
Daniel James Smith
2c367444ff
Group tools-owned feature flags (#13239)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-02-04 17:18:24 +00:00
Alex Morask
cf7a174d11
[PM-15179] Implement add-existing-organization-dialog.component (#13010)
* Implement add-existing-organization-dialog.component

* Add missing button type

* Thomas' feedback

* Import order issue
2025-02-04 09:02:12 -05:00
SmithThe4th
101cd940e9
[PM-14417] Create admin TaskService (#12891)
* [PM-14416] Add initial SecurityTask models and enums

* [PM-14416] Add support for PATCH request method and 204 No Content response

* [PM-14416] Add initial task service abstraction

* [PM-14416] Add SecurityTask state/key definitions

* [PM-14416] Add DefaultTaskService implementation

* [PM-14416] Add DefaultTaskService tests

* [PM-14416] Add better null checking to new models

* [PM-14416] Improve null value filtering for task service

* initial commit, added absract file and implementation file

* Added abstract method and implemented bulk create method

* Implemented get all api

* created spec file

* Fixed references

* Added exports

* Added tests

* fixed suggestions

* fixed test

---------

Co-authored-by: Shane Melton <smelton@bitwarden.com>
2025-02-03 16:20:48 -05:00
Vicki League
3c01abcdfd
[CL-569] Fix ngClass error on item content (#13235) 2025-02-03 20:43:27 +00:00
Oscar Hinton
e5ffc162b8
[CL-553] Migrate CL to Control Flow syntax (#12390) 2025-02-03 20:11:59 +01:00
Alec Rippberger
ec16efabf2
refactor(styles): [PM-17181] remove Bootstrap styles from UserVerificationFormInputComponent
Replace Bootstrap classes with Tailwind CSS equivalents to maintain consistent styling:
- Replace form-control with Tailwind input classes
- Replace btn and btn-outline-secondary with Tailwind button classes
- Replace d-block with tw-block
- Replace spacing and utility classes with tw- prefixed equivalents
- Replace box-content-row with Tailwind layout classes

[PM-17181]
2025-02-03 10:15:32 -06:00
Andreas Coroiu
d7c46bb3a5
[PM-16231] Improved SDK referencing (#12475)
* feat: implement Rc

* feat: use Rc in sdk service

* docs: add an example to `take()`

* fix: clarify function doc

* Add custom eslint rule package with enforced `using` rule (#13009)

* feat: add custom eslint rule

* feat: check for `UsingRequired` instead of hardcoding `Rc`

* chore: move package to libs

* wip: add tests. Tests work when run from same folder but not from root

* fix: add dependencies to renovate

* fix: add empty ts file to avoid typechecking throwing errors

* fix: tests not running from root

* chore: remove unecessary config

* fix: linting

* docs: add readme

* chore: add platform ownership

* chore: clean up comment

* Add support for flat config to "Improved sdk referencing" (#13054)

* WIP flat config for eslint

* Add rxjs

* Configure vscode to use flat config

* Fix some new linting errors

* Remove directory overrides of .eslintrc

* Remove explicit dependencies on typescript-eslint/ and @angular-eslint/

* Add missing rules

* Add rxjs recommended rules

* Add storybook and enabled rxjs-angular rule

* Add buildNoRestrictedImports helper

* Ignore platform import restrictions

* Remove unused ignores

* feat: migrate rules over to .mjs and flat config

* feat: implement support for .mjs tests

* chore: remove old package approach

* chore: update package-lock

* fix: add empty TS file to stop errors

* chore: clean up comments

---------

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

* fix: update CODEOWNERS to match folder name

* fix: renovate.json after merge

* fix: package.json, pin versions, sort order

* fix: update package-lock.json

---------

Co-authored-by: Hinton <hinton@users.noreply.github.com>
2025-02-03 15:09:25 +01:00
Vicki League
ca53ecccd0
[CL-569] Optionally allow item content to wrap (#13178) 2025-01-31 13:42:41 -05:00
Vincent Salucci
22edfd4283
fix: move feature flag to correct grouping, update casing, update callers, refs PM-17763 (#13184) 2025-01-31 12:18:17 -06:00
Alec Rippberger
8e70d5b923
feat(auth): [PM-3953] generalize copy for login with device flows
Updates UI text and translations for the login with device feature to be more consistent and clear across desktop, browser and web clients. Changes include:

- Updated titles and content for login via auth request components
- Revised translations for device approval modal
- Updated notification titles and alert messages
- Simplified device management URL handling
- Added missing translations across platforms

Resolves PM-3953
2025-01-31 11:54:41 -06:00
Daniel James Smith
6ae30f5059
Remove dependency on importer/core from libs/angular (#13137)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-01-31 14:04:35 +01:00
Will Martin
f17cb61183
[UIF] fix toast title type (#13098) 2025-01-30 16:20:41 -05:00
Jimmy Vo
7a1121dff4
[pm-17763] Add limitItemDeletion property to UI. (#13162) 2025-01-30 15:30:34 -05:00
Shane Melton
a404729c9e
[PM-17745] Catch network errors in new device notification guard (#13161)
* [PM-17745] Wrap new device guard applicability check in try/catch to prevent crashes from network errors

* [PM-17745] Fix broken test
2025-01-30 12:18:22 -08:00
Jimmy Vo
cbba1a686c
[pm-17363] Add LimitItemDeletion property to models (#13087) 2025-01-30 11:09:04 -05:00
Oscar Hinton
f8bdd66fbb
[PM-17629] Split up KM lib to km and km-ui (#13093) 2025-01-30 11:20:17 +01:00
Jordan Aasen
4b45029d23
[PM-17688] - generator dialog - add missing button label i18n keys. fix logic for disabling button (#13140)
* add missing button label i18n keys. fix logic for displaying button label

* Update comment

Co-authored-by:  Audrey  <ajensen@bitwarden.com>

---------

Co-authored-by:  Audrey  <ajensen@bitwarden.com>
2025-01-29 14:06:03 -08:00
Shane Melton
99ecf821dd
[PM-17713] Only use cachedCipherView if the cache was initialized from a cipher (#13133) 2025-01-29 13:40:03 -08:00
Daniel James Smith
ef38a96faf
[PM-16485] Remove legacy generator from change password component (#13132)
* Remove deprecated and unused PasswordGenerationService

* Remove unused state-service

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-01-29 14:40:48 -05:00
Shane Melton
db2b405421
Fix noop notification service registration (#13131)
* Re-order the constructor dependencies to match between Noop and Default notification service

* Fix test file

* One more missed constructor
2025-01-29 12:58:01 -05:00
Daniel James Smith
e73cb3e3ff
Move premium component into billing ownership (#12927)
* Move premium component into billing ownership

Update CODEOWNERS
Move files within libs/angular
Move files within desktop
Adjust import paths

* Remove configService

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-01-29 08:09:19 -08:00
Tom
ab197049f5
[PM-14562] Risk insights notification feature flag (#13095)
* Risk insights notification feature flag

* Feature flag should be false
2025-01-29 10:26:54 -05:00
Ike
60e569ed9d
[PM-15605] Add new device protection opt out (#12880)
* feat(newdeviceVerificaiton) : adding component and request model

* feat(newDeviceverification) : adding state structure to track verify devices for active user; added API call to server.

* feat(newDeviceVerification) : added visual elements for opting out of new device verification.

* Fixing tests for account service.
fixed DI for account service

* Fixing strict lint issues

* debt(deauthorizeSessionsModal) : changed modal to dialog. fixed strict typing for the new dialog for deviceVerification.

* fixing tests

* fixing desktop build DI

* changed dialog to standalone fixed names and comments.

* Adding tests for AccountService

* fix linting

* PM-15605 - AccountComp - fix ngOnDestroy erroring as it was incorrectly decorated with removed property.

* PM-15605 - SetAccountVerifyDevicesDialogComponent - only show warning about turning off new device verification if user doensn't have 2FA configured per task description

---------

Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
Co-authored-by: Jared Snider <jsnider@bitwarden.com>
2025-01-29 09:49:56 -05:00
Justin Baur
b07d6c29a4
Add Web Push Support (#11346)
* WIP: PoC with lots of terrible code with web push

* fix service worker building

* Work on WebPush Tailored to Browser

* Clean Up Web And MV2

* Fix Merge Conflicts

* Prettier

* Use Unsupported for MV2

* Add Doc Comments

* Remove Permission Button

* Fix Type Test

* Write Time In More Readable Format

* Add SignalR Logger

* `sheduleReconnect` -> `scheduleReconnect`

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>

* Capture Support Context In Connector

* Remove Unneeded CSP Change

* Fix Build

* Simplify `getOrCreateSubscription`

* Add More Docs to Matrix

* Update libs/common/src/platform/notifications/internal/worker-webpush-connection.service.ts

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>

* Move API Service Into Notifications Folder

* Allow Connection When Account Is Locked

* Add Comments to NotificationsService

* Only Change Support Status If Public Key Changes

* Move Service Choice Out To Method

* Use Named Constant For Disabled Notification Url

* Add Test & Cleanup

* Flatten

* Move Tests into `beforeEach` & `afterEach`

* Add Tests

* Test `distinctUntilChanged`'s Operators More

* Make Helper And Cleanup Chain

* Add Back Cast

* Add extra safety to incoming config check

* Put data through response object

* Apply TS Strict Rules

* Finish PushTechnology comment

* Use `instanceof` check

* Do Safer Worker Based Registration for MV3

* Remove TODO

* Switch to SignalR on any WebPush Error

* Fix Manifest Permissions

* Add Back `webNavigation`

* Sorry, Remove `webNavigation`

* Fixed merge conflicts.

---------

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
Co-authored-by: Todd Martin <tmartin@bitwarden.com>
Co-authored-by: Todd Martin <106564991+trmartin4@users.noreply.github.com>
2025-01-29 08:49:01 -05:00
Conner Turnbull
26a0594056
[PM-17655] Billing Code Ownership Updates (#13105)
* Moved has-premium.guard under billing

* Moved free-trial.ts to billing

* Moved premium directives to billing

* Moved families-policy.service.ts to billing

* Moved trial initiation from auth to billing
2025-01-28 13:17:00 -05:00
Nick Krantz
331c04a0fa
fix deep import for CipherFormComponent (#13107) 2025-01-28 08:49:48 -08:00
Nick Krantz
7c2bf504a3
[PM-11249] Sync attachment updates across platforms (#11758)
* update extension refresh form when an attachment is added or removed

- This is needed because the revision date was updated on the server and the locally stored cipher needs to match.

* receive updated cipher from delete attachment endpoint

- deleting an attachment will now alter the revision timestamp on a cipher.

* patch the cipher when an attachment is added or deleted

* migrate vault component to use the `cipherViews$` observable

* reference `cipherViews$` on desktop for vault-items

- This avoid race conditions where ciphers are cleared out in the background. `cipherViews` should always emit the latest views

* return CipherData from cipher service so that consumers have the updated cipher right away

* use the updated cipher from attachment endpoints to refresh the details within the add/edit components on desktop
2025-01-28 10:01:23 -06:00
Oscar Hinton
70ea75d8f7
[PM-17496] Migrate eslint to flat config (#12806)
The legacy config is deprecated and will be removed in eslint 10. The flat config also allows us to write js functions which will assist in handling limitations with multiple identical rules.
2025-01-28 16:40:52 +01:00
Brandon Treston
da422fd1bb
remove getUserId operator (#13091) 2025-01-27 13:17:06 -05:00
Oscar Hinton
146939bcf7
Fix linting (#13088) 2025-01-27 16:34:27 +00:00
renovate[bot]
c3bb76bee0
[deps] Architecture: Update eslint-plugin-tailwindcss to v3.18.0 (#12966)
* [deps] Architecture: Update eslint-plugin-tailwindcss to v3.18.0

* Fix linting

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
2025-01-27 11:12:12 -05:00
Matt Gibson
8577aae879
Test existing Login URI icon retrieval behavior (#12845) 2025-01-27 10:12:58 -05:00
Daniel James Smith
682e62cb6b
[PM-16485] Remove deprecated and unused PasswordGenerationService (#13053)
* Remove deprecated and unused PasswordGenerationService

* Remove unused state-service

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-01-27 10:12:20 -05:00
Maciej Zieniuk
9d987a2513
PM-16220: Account does not exist during login race condition (#12488)
Wait for an account to become available from separate observable, instead of blindly accepting that the value is there using `firstValueFrom`, while it's sometimes not there immediately.
2025-01-27 16:11:42 +01:00
Danielle Flinn
664ff9a1d3
[CL-276] Update tab-list-item styles (#13063) 2025-01-26 20:57:07 -05:00
✨ Audrey ✨
1fc20b55f2
[PM-15200] add "generated credential" screen reader notification (#12877)
replaces website$ dependency with `GenerateRequest`
2025-01-24 13:44:42 -06:00
Timshel
9a5ebf94a0
Prevent parallel refreshToken calls (#10799)
Co-authored-by: Todd Martin <106564991+trmartin4@users.noreply.github.com>
Co-authored-by: Patrick-Pimentel-Bitwarden <ppimentel@bitwarden.com>
2025-01-24 14:23:22 -05:00
Alex Morask
f630ee5f4e
[PM-11730] Remove feature flag: AC-2476-deprecate-stripe-sources-api (#13032)
* Remove FF from trial-billing-step.component

* Remove FF from user-subscription.component

* Remove FF from individual-billing-routing.module

* Remove FF from organization-billing.service

* Remove FF from organization-subscription-cloud.component

* Remove FF from organization-billing-routing.mdoule

* Remove FF from organization-plans.component

* Remove FF from change-plan-dialog.component

* Remove FF

* Remove legacy payment.component

* Rename V2: adjust-payment-dialog.component

* Rename V2: adjust-storage-dialog.component

* Rename V2: payment-label.component

* Rename V2: payment.component

* Rename V2: premium.component

* Patrick's feedback
2025-01-24 13:38:44 -05:00
Jared Snider
315e1338d5
PM-17466 - RegistrationFinishComp - Add call to loginSuccessHandlerService after successful login (#13059) 2025-01-24 13:25:51 -05:00
Jared Snider
6acaa6c711
Auth/PM-17197 - UnauthGuard Trusted Devices Lock State Refactor (#12938)
* PM-17197 - Refactor DeviceTrustService to deprecate active user state as I need to call with a user id per latest best practice

* PM-17197 - Refactor Unauth Guard to be aware of TDE lock state + use active user best practice.
2025-01-24 13:20:42 -05:00
Shane Melton
b1744c4e0a
[PM-17541] Fix folder service key definition (#13060)
* [PM-17541] Switch folder key definition back to "folders" and add migration script for users that have switched to the incorrect key

* [PM-17541] Fix import path

* [PM-17541] Fix implicit any in spec file
2025-01-24 10:12:52 -08:00