1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-09 05:57:40 +02:00
Commit Graph

268 Commits

Author SHA1 Message Date
Shane Melton
1b22320dc5
[AC-1041] My Vault filter on first login fix (#10301)
* [AC-1041] Ensure organizationTree$ updates whenever the policy observables emit

* [AC-1041] Ensure enforcePersonalOwnership updates whenever the policy observable emits

* [AC-1041] Do not attempt to pre-select null filter values or read-only collections
2024-08-13 10:32:02 -07:00
Vincent Salucci
471dd3bd7b
[PM-10294] Remove FC v1 from Clients (#10422)
* chore: remove fc v1 from org.canEditAnyCollection and update callers, refs PM-10294

* chore: remove fc v1 from collectionView.canEdit and update callers, refs PM-10294

* chore: remove fc v1 from organization.canEditAllCiphers and update callers, refs PM-10294

* chore: remove fc v1 from canDeleteAnyCollection, collection views, update callers, refs PM-10294

* chore: remove fc v1 from canEditUser/GroupAccess, refs PM-10294

* chore: remove fc v1 from canViewCollectionInfo, refs PM-10294

* chore: remove fc v1 from account component, refs PM-10294

* fix: remove fc v1 from collections component, refs PM-10294

* fix: update vault-items component, refs PM-10294

* fix: remove fc v1 from collection-dialog and collections components, refs PM-10294

* chore: remove ConfigService from group-add-edit and account components, refs PM-10294

* chore: change canEditAnyCollection to getter and update callers, refs PM-10294

* chore: change canEditUnmanagedCollections to getter and update callers, refs PM-10294

* chore: change canDeleteAnyCollection to getter and update callers, refs PM-10294

* chore: remove deprecated observable and update comments with v1, refs PM-10294

* chore: remove ununsed ConfigService from collection-dialog component, refs PM-10294

* chore: remove final fc v1 ref for vault-collection-row, refs PM-10294
2024-08-13 10:45:41 -05:00
Alec Rippberger
2b69ccda40
[PM-8655] Update web app new item button (#10354)
* Add additional extension refresh menu behind feature flag.

* Open new cipher dialog with proper cipher type selected.

* Adjust onboarding copy and default to login cipher.

* Update "New item" button styles.

* Add test to ensure onboarding component always calls onAddCipher.emit with the login cipher type.

* Hide onboarding and new item changes behind feature flag

* Fix missing mock in test.

* Remove extensionRefreshEnabled$ and conditional styles from the "add new" button.

* Remove rounding class from menu "new" button.
2024-08-08 23:45:47 -05:00
Oscar Hinton
c50a9063bc
[PM-2340] Enable use-lifecycle-interface (#5488)
Enables one of the recommended rules of @angular-eslint. Since this rule was fairly trivial to fix and has no QA effects it seemed reasonable to migrate all code.
2024-08-02 13:59:38 -04:00
Rui Tomé
766c2f4b9c
[PM-8290] Refresh vault after saving item collections (#10053) 2024-07-31 15:27:20 +01:00
renovate[bot]
b9eb4003a1
[deps] Autofill: Update prettier to v3.3.3 (#10228)
* [deps] Autofill: Update prettier to v3.3.3

* prettier formatting changes

* fix SyntaxError for literal @ inline html

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Prusik <jprusik@classynemesis.com>
2024-07-25 11:11:55 -04:00
SmithThe4th
91aa475766
[PM-6992] Refactor VaultComponent (#10126)
* Added function to return cipherview observable and trigger the decryption process if the cipherviews$ observable returns empty

* Updated the vault component to use getCipherViews$ observable function

* converted vault banner to standalone component

* converted vault header to standalone component

* fixed unawaited promises

converted component to standalone component

* cleaned up vault module

* fixed imports

* refactored getCipherView$ observable

* refactored onVaultItemsEvent to switch case

* Refactored to use toast service instead of platform utils service for toast

* Added function to return cipherview observable and trigger the decryption process if the cipherviews$ observable returns empty

* Updated the vault component to use getCipherViews$ observable function

* converted vault banner to standalone component

* converted vault header to standalone component

* fixed unawaited promises

converted component to standalone component

* cleaned up vault module

* fixed imports

* refactored getCipherView$ observable

* refactored onVaultItemsEvent to switch case

* Refactored to use toast service instead of platform utils service for toast

* merged with main and fixed conflicts

* reordered standalone property

* converted components to standalone

* cleaned up ng module for org vault

* cleaned up vault module individual vault

* fixed conflicts

* Replaced deprecated toast service

* refactored to use switch case for org vault

* fixed comments and fixed failing tests

reverted to use getAllDecrypted
2024-07-23 16:47:54 -04:00
SmithThe4th
c27657eb82
[PM-8050] Deleting one folder deletes all other folders (#10165)
* removed the use of deletepromise from folder edit dialog on web

* resolved fix me

* return folders if folder is not found with folder id
2024-07-18 18:28:25 -04:00
Nick Krantz
9bfd838da6
[PM-8381] Assign collections (#9854)
* initial add of assign collections component

* grab cipherId from query params

* add organization selection for moving a cipher

* add multi-select for collections

* add transfer of cipher to an organization

* temp: do not show assign collections while a cipher already has an organization

* account for initial collections for a cipher

* block assign-collections route with feature flag

* replace hardcoded string with i18n

* separate out async calls to switchMap to avoid async subscribe

* use local cipher rather than decrypting again

* use anchor for better semantics

* migrate form submission to bitSubmit directive

* swap to "assign" rather than "save"

* integrate with base AssignCollections component

* clean up messages file

* remove unneeded takeUntilDestroyed

* remove unneeded bitFormButton

* remove unused translations

* lint fix

* refactor assign-collections component to take in a button reference

- This allows consuming components to not have to worry about loading/disabled states
- The base AssignCollections component will change the submit button when supplied
2024-07-18 08:53:53 -05:00
Oscar Hinton
d852a5ff07
[PM-97089] [Bootstrap] Convert remaining sr-only to tw-sr-only (#10094)
We're still using sr-only in multiple places. This is a bootstrap utility class and needs to be migrated to tw-sr-only.
2024-07-16 11:59:04 +01:00
SmithThe4th
7588e06d2b
fix blank titles on menu options button (#10099) 2024-07-12 12:16:54 -04:00
SmithThe4th
050f8f4bdc
[PM-7624] [PM-7625] Bulk management actions on individual vault (#9507)
* fixed issue with clearing search index state

* clear user index before account is totally cleaned up

* added logout clear on option

* removed redundant clear index from logout

* added feature flag

* added new menu drop down and put behind feature flag

* added permanentlyDeleteSelected to the menu

* added permanentlyDeleteSelected to the menu

* wired up logic to show to hide menu drop down items

* modified the bulk collection assignment to work with end user vault

* wired up delete and move to folder

* merged bulk management actions header into old leveraging the feature flag

* added ability to move personal items to an organization and set active collection when user is on a collection

* made collection required by default

* handled organization cipher share when personal items and org items are selected

* moved logic to determine warning text to component class

* moved logic to determine warning text to component class

* Improved hide or show logic for menu

* added bullet point to bulk assignment dialog content

* changed description for move to folder

* Fixed issue were all collections are retrived instead of only can manage, and added logic to get collections associated with a cipher

* added inline assign to collections

* added logic to disable three dot to template

* Updated logic to retreive shared collection ids between ciphers

* Added logic to make attachment view only, show or hide

* Only show menu options when there are options available

* Comments cleanup

* update cipher row to disable menu instead of hide

* Put add to folder behind feature flag

* ensured old menu behaviour is shown when feature flag is turned off

* refactored code base on code review suggestions

* fixed bug with available collections

* Made assign to collections resuable

made pluralize a pipe instead

* Utilized the resuable assign to collections component on the web

* changed description message for collection assignment

* fixed bug with ExpressionChangedAfterItHasBeenCheckedError

* Added changedetectorref markForCheck

* removed redundant startwith as seed value has been added

* made code review suggestions

* fixed bug where assign to collections shows up in trash filter

* removed bitInput

* refactored based on code review comments

* added reference ticket

* [PM-9341] Cannot assign to collections when filtering by My Vault (#9862)

* Add checks for org id myvault

* made myvault id a constant

* show bulk move is set by individual vault and it is needed so assign to collections does not show up in trash filter (#9876)

* Fixed issue where selectedOrgId is null (#9879)

* Fix bug introduced with assigning items to a collection (#9897)

* [PM-9601] [PM-9602] When collection management setting is turned on view only collections and assign to collections menu option show up (#10047)

* Only show collections with edit access on individual vault

* remove unused arguments
2024-07-11 17:39:49 -04:00
Addison Beck
b7e3f5bc68
Restructure the org-permissions guard to be Angular 17+ compliant (#9631)
* Document the `org-permissions` guard in code

* Restructure the `org-permissions` guard to be Angular 17+ compliant

* Update the `org-permissions` guard to use `ToastService`

* Simplify callback function sigantures

* Remove unused test object

* Fix updated route from merge
2024-07-02 09:53:06 -05:00
Addison Beck
71e8fdb73d
Add the ability for custom validation logic to be injected into UserVerificationDialogComponent (#8770)
* Introduce `verificationType`

* Update template to use `verificationType`

* Implement a path for `verificationType = 'custom'`

* Delete `clientSideOnlyVerification`

* Update `EnrollMasterPasswordResetComponent` to include a server-side hash check

* Better describe the custom scenerio through comments

* Add an example of the custom verficiation scenerio

* Move execution of verification function into try/catch

* Migrate existing uses of `clientSideOnlyVerification`

* Use generic type option instead of casting

* Change "given" to "determined" in a comment
2024-07-01 11:52:39 -04:00
✨ Audrey ✨
1080d46aaf
[PM-9170] generator library migrations (#9812)
* migrate browser to generator libraries
* migrate cli to generator libraries
* migrate desktop to generator libraries
* migrate angular library to generator libraries
* migrate web to generator libraries
2024-06-27 12:16:04 -04:00
Jake Fink
0add2949c0
[PM-8772] move ranges to static properties on class (#9567)
* move ranges to static properties on class

* rename static properties
2024-06-25 08:21:02 -04:00
Jason Ng
1826403d8d
added a clear organization method inside vault-filter service (#9786) 2024-06-24 12:30:04 -07:00
SmithThe4th
eadb1fa4ef
[PM-7215] User with Can View permission can remove passkey or delete URIs from UI, though it isn't saved (#9607)
* Removed - button on passkeys and uris when user has view only access, disabled cog button and made input fields on uris readonly when user has view only access

(cherry picked from commit 077edd77c1)

* switched to use viewonly to hide remove button

(cherry picked from commit dbd854494f)
2024-06-20 10:59:11 -04:00
Oscar Hinton
cbb2fa9442
[PM-8972] Migrate callouts to the new CL callout (#9710)
* Migrate callouts to the new CL callout
2024-06-20 15:45:48 +02:00
Nick Krantz
c219addc1c
[PM-2664] Hide Owners column below desktop viewports (#8923)
* hide owners row below desktop viewports

* hide collection owner on smaller screens
2024-06-18 08:23:02 -05:00
Conner Turnbull
f484dd491b
[PM-8830] Billing Enums Rename (#9612)
* Renamed ProductType to ProductTierType

* Renamed Product properties to ProductTier

* Moved product-tier-type.enum.ts to billing folder

* Added ProductType enum
2024-06-14 15:43:40 -04:00
Shane Melton
2ff9c3bb76
[AC-2771] [AC-2772] Provider Restriction Fixes (#9635)
* [AC-2771] Do not make API request when restricted provider is not a member of the org

* [AC-2771] Fix console errors when switching organizations

* [AC-2772] Fix org vault for providers who are members
- Show vault filters
- Hide header search bar
- Show create new item button
2024-06-13 13:18:49 -07:00
Shane Melton
e56a3386a2
[AC-2763] Allow providers who are also members access to items (#9585)
* [AC-2763] Do not restrict providers if they are also a member of the organization

* [AC-2763] Reduce branching complexity

* [AC-2763] Remove explicit restrict provider access checks in Vault

We can safely fall back organization helpers for cipher access as it already accounts for provider users who are members.
2024-06-13 07:21:14 -07:00
Vincent Salucci
b169207b74
[AC-2647] Remove Flexible Collections MVP code (#9518)
* chore: organization.ts, remove refs to flexibleCollections and isManager, refs AC-2647

* chore: clean up callers of removed methods from organization.ts, refs AC-2647

* chore: access-selector, remove fc input and update permissionList param, refs AC-2647

* chore: update permissionList caller, update group-add-edit fc refs, and remove accessAll, refs AC-2647

* chore: update member-dialog fc callers, refs AC-2647

* chore: update bulk-collections-dialog fc callers, refs AC-2647

* chore: update collection-dialog fc callers, refs AC-2647

* chore: update simple fc caller to misc files, refs AC-2647

* chore: update member-dialog fc callers, refs AC-2647

* chore: remove accessAll references and update callers, refs AC-2647

* chore: update comment to specify v1 usage, refs AC-2647

* chore: remove unused message keys and code calls to use those messages, refs AC-2647

* chore: remove readonly false from access-selector model map function, refs AC-2647
2024-06-10 11:59:20 -05:00
Justin Baur
1aaa88a64d
[PM-7837] Move SyncService to Platform Ownership (#9055)
* Move

* Update  References In Unowned Files

* Update  References In Vault Files

* Update Web AppComponent

* Add Import
2024-06-05 10:48:12 -04:00
Vincent Salucci
e47f83db80
fix: remove view events menu option for users without permission, refs PM-7024 (#9355) 2024-05-28 14:17:20 -05:00
Matt Gibson
c61ba41b97
Use User Key Definitions for user-scoped data (#9348) 2024-05-27 08:12:28 -04:00
Merissa Weinstein
15ba7040e5
[PM-6606] remove onboarding feature flag (#9178)
* remove feature flag value from enum

* remove feature flag from onboarding component

* remove ConfigService mock from spec

* fix format
2024-05-24 09:02:17 -05:00
Shane Melton
0b950080ca
[PM-8004] [AC-2603] [AC-2616] [AC-2621] [AC-2622] Unmanaged collection fixes (#9301)
* [AC-2603] Add unmanaged property to CollectionAdminView and response models

* [AC-2603] Cleanup CollectionViews

- Remove getters that have been replaced with Unmanaged property
- Remove AddAccess that is also being replaced
- Add canEditUnmanagedCollections() helper to organization

* [AC-2603] Replace old AddAccess logic with Unmanaged flag

* [AC-2603] Fix failing test

* [AC-2603] Ensure Add Access badge/toggle only shows when V1 flag is enabled

* [AC-2603] Undo change to canEditUserAccess and canEditGroupAccess

Custom users should not get access to an unmanaged collection with only Manage Groups and Manage User permissions. That is still reserved for admin/owners and EditAnyCollection custom users.
2024-05-22 11:58:04 -07:00
Jason Ng
b7463d551c
[AC- 2493] Restore and Delete Unassigned Items (#8983)
* updates added for single and bulk delete and restore items including unassigned and permissions for owners and custom users
2024-05-21 12:32:02 -04:00
KiruthigaManivannan
f6d28bed70
PM-2166 Update Purge vault dialog (#8658)
* PM-2166 Update purge vault dialog

* PM-2166 Fixed ESlint issue
2024-05-21 18:37:01 +05:30
Thomas Rittson
e5fb4d80f8
Make custom users subject to collection settings (#9231)
* Affects ManageUsers and ManageGroups
2024-05-21 10:45:54 +10:00
Nick Krantz
6c61cd4f63
[AC-217] Migrate to Banner Component (#8899)
* convert premium card to banner component

- create VaultBanners component that will handle all banner logic

* move upgrade browser notice to banner component

* refactor verify email component to use the banner component

* add email banner to VaultBanners component

* move low KDF message to banner component

* remove unused KDF component

* allow multiple banners to be displayed at once

* use vault service to consolidate premium banner logic
- Implement prompt thresholds for premium banner
- Update dismiss logic to re-run visibility logic

* update variable name

* move all dismiss/show logic to vault banner service

* rename tense of methods for readability

* apply underline to send email button to match other banner actions

* fix dark mode styling across banners

* remove unused variable

* use bitLink directive for styling rather than tailwind

* move premium banner to a standalone observable

* update bootstrap styles to tailwind

* use new KDF service for vault banners

* move the VerifyEmailComponent to a standalone component

* convert premium banner to a singular observable

* remove unneeded import

* AC-2589 add unique id for each vault banner

* AC-2588 poll sync service to only show premium banner after a sync

* close subscription to syncCompleted$ after one emit

* remove unneeded ReplaySubject
2024-05-20 16:06:35 -05:00
Matt Gibson
ee690cd1ef
Use account service for getting account profile data. (#9133)
* Use account service for getting account profile data.

* desktop build fixes

* CLI build fixes

* Remove state service methods
2024-05-17 00:21:00 +02:00
Shane Melton
ff15b05d2d
[AC-2601] Only hide vault filter for providers when feature flag is enabled (#9179) 2024-05-16 14:24:18 -07:00
Thomas Rittson
121494fb2e
[AC-2610] [AC-2613] Fix copy in members and groups dialogs (#9200)
* Add missing copy to member dialog

* [AC-2613] Fix copy for providers in Collections tabs
2024-05-16 11:15:33 -05:00
Jason Ng
db2f60b684
[AC-2483] Added new Add Access UI to the collection dialog for AC (#9090)
* added new Add Access UI to the collection dialog for AC
2024-05-15 14:27:15 -04:00
Thomas Rittson
6ab7336c21
[AC-2499] Add permission checks on bulk actions menu (#8912)
* Add permission checks for org vault bulk actions

* Show checkboxes for all collections except Unassigned

* Separate individual and admin logic between CollectionView
  and CollectionAdminView

* Remove heading for error toasts per design feedback
2024-05-15 08:29:54 +10:00
Shane Melton
b4f4818635
[PM-7883] Fix Collection Dialog Component (#9088)
* [PM-7883] Cleanup/refactor collection-dialog.component

- Add new limitNestedCollections option
- Remove redundant calls to collectionService and collectionAdminService
- Adjust deleted parent logic to account for users that cannot ViewAllCollections

* [PM-7883] Ensure collection management setting is considered when limiting nested collections in the org vault
2024-05-14 08:24:51 -07:00
Thomas Rittson
16971be52d
Fix restricted access view not loading for providers (#9165) 2024-05-14 09:02:26 +10:00
Thomas Rittson
a4cc7a3ec3
[AC-2487] [AC-2486] Changes to restricted access view (#9118)
* [AC-2487] Hide edit/view collection button in restricted access view

* [AC-2486] Update button icon and text in restricted access view
2024-05-14 08:41:03 +10:00
Thomas Rittson
8c5841a76a
[AC-2500] Collection row menus - adjust feature flagging (#9116) 2024-05-13 15:30:02 -07:00
Vincent Salucci
3900924250
[AC-2086] Update CanDelete with v1 flag logic (#9100)
* feat: update org domain object deleteAnyCollection with v1 flag logic, refs AC-2086

* feat: update canDelete method to handle v1 flag logic, refs AC-2086

* feat: update canDelete references to pass v1 flag, refs AC-2086

* feat: add provider check and modify owner/admin type checks, refs AC-2086

* fix: add permission to org instantiation for vault item stories, refs AC-2086
2024-05-13 16:13:27 -05:00
Merissa Weinstein
7ea786e662
[PM-7998] update chrome extension link in the vault onboarding module (#9087)
* vault-onboarding: update chrome extension link

* update spec
2024-05-13 10:20:57 -05:00
Thomas Rittson
a852493211
Fix build error (#9150) 2024-05-13 10:22:01 -04:00
Rui Tomé
a141d06c00
[AC-2484] Fix bug where Custom Users with "Delete any collection" permission incorrectly see "Can Edit" permission for Unassigned Collection (#8858)
* [AC-2484] Fix bug where Custom Users with "Delete any collection" permission incorrectly see "Can Edit" permission for Unassigned Collection

* [AC-2484] Undo change on permission tooltip permission check

* [AC-2484] Fix permission text for unassigned collection
2024-05-11 14:54:12 +01:00
Thomas Rittson
8e97c1c8e4
[AC-2500] Update inline menu for collections based on collection permissions (#9080)
* Add view collection options to collection row menus

* Prevent DeleteAnyCollection custom users from viewing collections
2024-05-10 10:50:34 +10:00
Shane Melton
3a71322510
[AC-1707] Restrict provider access to items (#8265)
* [AC-1707] Add feature flag

* [AC-1707] Prevent loading ciphers for provider users in the org vault when the feature flag is enabled

* [AC-1707] Ensure new canEditAllCiphers logic only applies to organizations that have FC enabled

* [AC-1707] Update editAllCiphers helper to check for restrictProviderAccess feature flag

* [AC-1707] Remove un-used vaultFilterComponent reference

* [AC-1707] Hide vault filter for providers

* [AC-1707] Add search to vault header for provider users

* [AC-1707] Hide New Item button for Providers when restrict provider access feature flag is enabled

* [AC-1707] Remove leftover debug statement

* [AC-1707] Update canEditAllCiphers references to consider the restrictProviderAccessFlag

* [AC-1707] Fix collections component changes from main

* [AC-1707] Fix some feature flag issues from merge with main

* [AC-1707] Avoid 'readonly' collection dialog for providers

* [AC-1707] Fix broken Browser component

* [AC-1707] Fix broken Desktop component

* [AC-1707] Add restrict provider flag to add access badge logic
2024-05-07 12:35:28 -07:00
Shane Melton
c241aba025
[AC-2555] Cipher collections dialog merge fixes (#9036)
* [AC-2555] Fix missing feature flags in CollectionsComponent

* [AC-2555] Do not filter collections when opening the cipher collections dialog in the org vault
2024-05-07 10:00:47 -07:00
Jason Ng
be51f1934a
[AC-1121] Collections Add Access filter and badge (#8404)
* added bit toggle group for add access filter to AC collections
2024-05-07 11:02:50 -04:00