1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00
Commit Graph

62 Commits

Author SHA1 Message Date
Nick Krantz
c782de57a3 use optional chaining for possibly undefined cipher when selecting only collections (#16886) 2025-10-15 09:49:24 -05:00
Jason Ng
98af7a13ed [PM-19152] Archive in Web (#16686)
* archive and unarchive an individual item

* bulk archive and unachive

* updates to text strings for archive empty state and tooltips

* update translation keys to have an archive verb and noun differentiation

* if premium member loses premium and has archive items. apply filter changes, and item more option changes

* updating unArchive text

* unarchive an archived item on edit if user loses premium

* updates for unarchive btn, refactor archive flag for less churn

* add services to cipher form stories

* add refresh to archive calls in vault, update bulk archive copy

* Do not show archive ability for deleted items

* add archive check for login menu actions

* remove assign to collections for archive filter

* update bulk success message

* add error handling for archive methods

* fix null reference check

* add unarchive icon

---------

Co-authored-by: Nick Krantz <nick@livefront.com>
2025-10-14 16:41:05 -05:00
Oscar Hinton
8cf379d997 [PM-22305] Upgrade typescript to 5.8 (#15044)
Upgrade to the latest supported typescript version in Angular.

Resolved TS errors by:
  - adding `: any` which is what the compiler previously implied and now warns about.
  - adding `toJSON` to satisfy requirement.
2025-10-06 12:39:40 -04:00
Oscar Hinton
e0da2671b4 [PM-13374] Update all SDK uuids (#14962)
* fix: broken SDK interface

* Fix all compile errors related to uuids

* Fix browser desktop

* Fix tests

---------

Co-authored-by: Andreas Coroiu <andreas.coroiu@gmail.com>
2025-08-29 13:09:33 -04:00
Brandon Treston
27089fbb57 [PM-24227] Enable TS-strict for Collection Domain models (#15765)
* wip ts-strict

* wip ts-strict

* wip

* cleanup

* cleanup

* fix story

* fix story

* fix story

* wip

* clean up CollectionAdminView construction

* fix deprecated function call

* fix cli

* clean up

* fix story

* wip

* fix cli

* requested changes

* clean up, fixing minor bugs, more type saftey

* assign props in static ctor, clean up
2025-08-14 13:08:24 -04:00
Ketan Mehta
8980016d2d [PM-23378] clear selection after event on (#15465)
* clear selection after event on individual part

* added changes in org

* added clearSelection in refresh()

---------

Co-authored-by: Jason Ng <jng@bitwarden.com>
2025-08-06 09:45:38 -04:00
Vicki League
26c0176e2e [CL-712] Update icon button, components using it, and affected virtual scroll heights (#15683) 2025-08-05 10:58:49 -04:00
Jason Ng
2e6977e98c [PM-23788] changed the getType for canClone to address new cipherLike (#15829) 2025-07-30 08:54:45 -04:00
Nick Krantz
5410e42322 use bang operator to check for the presence of an organizationId. (#15802)
strict equality with `null` doesn't work with the SDK as `undefined` is populated rather than `null`
2025-07-28 13:05:07 -05:00
Jason Ng
d0082981a3 [PM-23788] [PM-23793] Prevent Card Clone when Restricted (#15685)
* add restricted policy check to vault items in web and browser
2025-07-23 12:04:31 -04:00
Jordan Aasen
436b3567dc [PM-23478] - Can view org's cards in AC (#15669)
* properly filter restricted item types in AC

* fix storybook
2025-07-18 15:08:21 -07:00
Nick Krantz
b4120e0e3f [PM-22134] Migrate list views to CipherListView from the SDK (#15174)
* add `CipherViewLike` and utilities to handle `CipherView` and `CipherViewLike`

* migrate libs needed for web vault to support `CipherViewLike`

* migrate web vault components to support

* add  for CipherView.  will have to be later

* fetch full CipherView for copying a password

* have only the cipher service utilize SDK migration flag

- This keeps feature flag logic away from the component
- Also cuts down on what is needed for other platforms

* strongly type CipherView for AC vault

- Probably temporary before migration of the AC vault to `CipherListView` SDK

* fix build icon tests by being more gracious with the uri structure

* migrate desktop components to CipherListViews$

* consume card from sdk

* add browser implementation for `CipherListView`

* update copy message for single copiable items

* refactor `getCipherViewLikeLogin` to `getLogin`

* refactor `getCipherViewLikeCard` to `getCard`

* add `hasFido2Credentials` helper

* add decryption failure to cipher like utils

* add todo with ticket

* fix decryption failure typing

* fix copy card messages

* fix addition of organizations and collections for `PopupCipherViewLike`

- accessors were being lost

* refactor to getters to fix re-rendering bug

* fix decryption failure helper

* fix sorting functions for `CipherViewLike`

* formatting

* add `CipherViewLikeUtils` tests

* refactor "copiable" to "copyable" to match SDK

* use `hasOldAttachments` from cipherlistview

* fix typing

* update SDK version

* add feature flag for cipher list view work

* use `CipherViewLikeUtils` for copyable values rather than referring to the cipher directly

* update restricted item type to support CipherViewLike

* add cipher support to `CipherViewLikeUtils`

* update `isCipherListView` check

* refactor CipherLike to a separate type

* refactor `getFullCipherView` into the cipher service

* add optional chaining for `uriChecksum`

* set empty array for decrypted CipherListView

* migrate nudge service to use `cipherListViews`

* update web vault to not depend on `cipherViews$`

* update popup list filters to use `CipherListView`

* fix storybook

* fix tests

* accept undefined as a MY VAULT filter value for cipher list views

* use `LoginUriView` for uri logic (#15530)

* filter out null ciphers from the `_allDecryptedCiphers$` (#15539)

* use `launchUri` to avoid any unexpected behavior in URIs - this appends `http://` when missing
2025-07-17 14:55:32 -05:00
Jordan Aasen
60419bd96f add new-cipher-menu component (#15467)
* add new-cipher-menu component

* move new cipher menu to vault. clean up template
2025-07-16 12:39:38 -07:00
Jason Ng
25005b602e [PM-22635] Only Show Assign to Collections Bulk Menu Option When Item Selected Is Editable (#15217)
* assign to collections option in bulk menu only shows when editable item selected and user has editable collections
2025-06-26 14:53:26 -04:00
Jordan Aasen
1175da3845 [PM-20642] - [Vault] [Web App] Front End Changes to Enforce "Remove card item type policy" (#15097)
* add restricted item types service and apply it to filter web cipher

* code cleanup. add shareReplay

* account for multiple orgs when restricting item types

* restrict item types for specific orgs

* clean up logic. use policiesByType$

* track by item.type

* clean up filtering. prefer observable. do not exempt owners for restricted item types

* simplify in vault-filter. move item filter logic to vault. fix tests

* don't return early in filter-function
2025-06-11 09:30:12 -07:00
Jason Ng
3326877a67 [PM-21719] Remove Assign To Collections Modal When No Editable Collections (#15137)
* remove assign to collections option when user does not have editable collections
2025-06-10 18:03:17 -04:00
Rui Tomé
b5bddd0b06 [PM-17154] Limit item deletion feature flag removal (#15094)
* Refactor components to remove limitItemDeletion feature flag usage

This commit simplifies the logic in various components by removing the limitItemDeletion feature flag. The conditions for displaying restore and delete actions are now based solely on the cipher's permissions, enhancing code clarity and maintainability.

* Refactor cipher deletion logic to remove the feature flag and collection ID dependency

This commit updates the cipher deletion logic across multiple components and services by removing the unnecessary dependency on collection IDs. The `canDeleteCipher$` method now solely relies on the cipher's permissions, simplifying the code and improving maintainability.

* Remove LimitItemDeletion feature flag from feature-flag enum and default values

* Remove configService from ServiceContainer and MainBackground constructor parameters

* Remove configService from RestoreCommand instantiation in OssServeConfigurator and VaultProgram classes
2025-06-10 09:57:34 +01:00
Oscar Hinton
ac49e594c1 Add standalone false to all non migrated (#14797)
Adds standalone: false to all components since Angular is changing the default to true and we'd rather not have the angular PR change 300+ files.
2025-05-15 10:44:07 -04:00
Brandon Treston
027331620b fix bulk menu (#14079) 2025-04-01 16:02:45 -04:00
Brandon Treston
78c74f7acd fix qa bug (#14047) 2025-03-31 11:11:17 -04:00
Brandon Treston
4d68952ef3 [PM-18089] Update cipher permissions model and consumers (#13606)
* update cipher permissions model and consumers

* add new property to tests

* fix test, add property to toCipherData()

* add missing ConfigService

* fix story

* refactor

* fix error, cleanup

* revert refactor

* refactor

* remove uneeded test

* cleanup

* fix build error

* refactor

* clean up

* add tests

* move validation check to after featrue flagged logic

* iterate on feedback

* feedback
2025-03-14 09:51:40 -04: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
Matt Gibson
9c1e2ebd67 Typescript-strict-plugin (#12235)
* Use typescript-strict-plugin to iteratively turn on strict

* Add strict testing to pipeline

Can be executed locally through either `npm run test:types` for full type checking including spec files, or `npx tsc-strict` for only tsconfig.json included files.

* turn on strict for scripts directory

* Use plugin for all tsconfigs in monorepo

vscode is capable of executing tsc with plugins, but uses the most relevant tsconfig to do so. If the plugin is not a part of that config, it is skipped and developers get no feedback of strict compile time issues. These updates remedy that at the cost of slightly more complex removal of the plugin when the time comes.

* remove plugin from configs that extend one that already has it

* Update workspace settings to honor strict plugin

* Apply strict-plugin to native message test runner

* Update vscode workspace to use root tsc version

* `./node_modules/.bin/update-strict-comments` 🤖

This is a one-time operation. All future files should adhere to strict type checking.

* Add fixme to `ts-strict-ignore` comments

* `update-strict-comments` 🤖

repeated for new merge files
2024-12-09 20:58:50 +01:00
Victoria League
3b5b2d6bd6 [CL-265] CL/extension refresh feature branch (#8696)
* [CL-245] Update palette to new light and dark theme colors (#8633)

* [CL-245] Add new color swatches to storybook (#8697)

* [CL-238] update typography (#8997)

* [CL-230] [CL-296] Update button styles (#9345)

* [CL-237] Update menu styles for extension refresh (#9525)

* [CL-267] Add 100-level color variants and update primary-600 (#9550)

* [CL-286] Update badge to use focus-visible instead of focus (#9551)

* [CL-250] Update badge styles for extension refresh (#9572)

* [CL-234] callout style refresh (#9920)

* [CL-233] Update form field styles (#9776)

* [CL-239][CL-251][CL-342] dialog style refresh (#10096)

* [CL-239] simple dialog style refresh

* [CL-342] fix text overflow in dialog; add story

* [CL-244] readonly fields (#10164)

* [CL-352] Fix Angular errors related to form element changes (#10211)

* [CL-273] Update styles for checkbox and form control (#10146)

* [CL-274] Update styling for radio button (#10333)

* [CL-338] Remove extra space in item content when end slot is empty (#10350)

* [CL-377] Fix extension style conflict for input background (#10351)

* [CL-271] Update styles for toggle (#10377)

* [CL-381] Update spacing around form elements (#10432)

* [CL-229] Update icon button styles (#10405)

* [CL-380] Remove hover state from disabled form fields (#10639)

* [CL-405] Allow toggle group input to be full width (#10658)

* [CL-389] Exclude end slot label content from truncation (#10508)

* [CL-383] Remove manual focus when password toggle is clicked (#10749)

* [CL-278][CL-391] misc bit-item style fixes (#10758)

* [CL-391] use pointer cursor on hover when link or button

* [CL-210] Change base font size from 14px to 16px (#10779)

* [CL-291] Finalize styling for chip select (#10771)

* [CL-257] update banner component styles (#10766)

* [CL-443] Fix sizing issues (#10893)

* [CL-445] Fix small sizing and spacing issues (#10962)

* [CL-382] Reduce element shifting on readonly hover (#10956)

* [CL-396] Update theme colors to new hexes (#10968)

* [CL-395] Remove text headers color (#10997)

* [CL-404] Switch to primary-600 for all focus indicators (#11015)

* [CL-397] Remove primary-500 (#11036)

* [CL-447] Ensure DM Sans displays correctly at all font weights (#11041)

* [CL-448] Scrollbar Styles (#11111)

* CL-252/update toast (#10996)

* [CL-275] Update link styles (#11174)

* [CL-446] Update hover state for unselected chip selects (#11172)

* [CL-454] Improve color a11y for toast and banner interactive elements (#11200)

* [CL-457] Center input text for select and multiselect (#11239)

* [CL-455] Do not use responsive margin for sections in dialogs or extension (#11243)

* [CL-459] Fix chip behavior when opening menu while item is selected (#11227)

* [CL-388] Update vertical nav colors for new palette (#11226)

* scope styled scrollbar to only select elements (#11247)

* edit radio buttons to be block inputs and update spacing (#11291)

* [CL-453] Fix multiselect chip spacing and truncation (#11300)

* [PM-11131] Prevent duplicated sr labels on form field icon buttons (#11383)

* [CL-303] Prevent chip menu from running offscreen (#11348)

* [CL-476] Fix DM Sans font on Windows (#11409)

* implements scrollbar styles for firefox/chrome and safari (#11447)

* [CL-472] Fix search background color in extension (#11466)

* [CL-481] Style updates for bit-item, bit-card, and primary-100 (#11473)

* [CL-478] Remove underline on hover for most components (#11477)

* [CL-477] Remove focus styles for readonly input (#11510)

* [CL-487] Fix vault items virtual scroll height (#11581)

* [PM-8625] Increase popup width (#11686)

* [CL-494] Wrap long words in toggle group (#11659)

* [CL-13820] Add class to remove link underline (#11762)

* [CL-435] Prevent Windows extension from shifting (#11851)

* [CL-503] Add notification color variables (#11802)

* [PM-14043] Update size of toggle group label to fit more content (#11881)

* [CL-498] Set chip menu width minimum to chip select width (#11905)

---------

Co-authored-by: Will Martin <contact@willmartian.com>
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
Co-authored-by: Nick Krantz <125900171+nick-livefront@users.noreply.github.com>
Co-authored-by: Merissa Weinstein <merissa.k.weinstein@gmail.com>
Co-authored-by: Danielle Flinn <43477473+danielleflinn@users.noreply.github.com>
2024-11-15 09:21:17 -05:00
SmithThe4th
faf7e3d315 [PM-11201][CL-507] Add the ability to sort by Name, Group, and Permission within the collection and item tables (#11453)
* Added sorting to vault, name, permission and group

Added default sorting

* Fixed import

* reverted test on template

* Only add sorting functionality to admin console

* changed code order

* Fixed leftover test for sortingn

* Fixed reference

* sort permissions by ascending order

* Fixed bug where a collection had multiple groups and sorting alphbatically didn't happen correctly all the time

* Fixed bug whne creating a new cipher item

* Introduced fnFactory to create a sort function with direction provided

* Used new sort function to make collections always remain at the top and ciphers below

* extracted logic to always sort collections at the top

Added similar sorting to sortBygroup

* removed org vault check

* remove unused service

* Sort only collections

* Got rid of sortFn factory in favour of passing the direction as an optional parameter

* Removed tenary

* get cipher permissions

* Use all collections to filter collection ids

* Fixed ascending and descending issues

* Added functionality to default sort in descending order

* default sort permissions in descending order

* Refactored setActive to not pass direction as a paramater
2024-11-07 10:10:15 -05:00
Shane Melton
a0fe4f4ca6 [PM-13892] Browser Refresh - Organization item clone permission fix (#11660)
* [PM-13892] Introduce canClone$ method on CipherAuthorizationService

* [PM-13892] Use new canClone$ method for the 3dot menu in browser extension

* [PM-13892] Add todo for vault-items.component.ts
2024-10-24 14:12:04 -07:00
Nick Krantz
44e182e32e [PM-13187] Hide "Assign To Collections" when the user has no orgs (#11668)
* web - hide assign to collections button when the user has no organizations

* browser - hide assign to collections button when the user has no organizations

* hide assign to collections in the bulk edit menu when the user doesn't belong to an organization
2024-10-24 10:30:46 -05:00
SmithThe4th
4a30782939 [PM-12281] [PM-12301] [PM-12306] [PM-12334] Move delete item permission to Can Manage (#11289)
* Added inputs to the view and edit component to disable or remove the delete button when a user does not have manage rights

* Refactored editByCipherId to receive cipherview object

* Fixed issue where adding an item on the individual vault throws a null reference

* Fixed issue where adding an item on the AC vault throws a null reference

* Allow delete in unassigned collection

* created reusable service to check if a user has delete permission on an item

* Registered service

* Used authorizationservice on the browser and desktop

Only display the delete button when a user has delete permission

* Added comments to the service

* Passed active collectionId to add edit component

renamed constructor parameter

* restored input property used by the web

* Fixed dependency issue

* Fixed dependency issue

* Fixed dependency issue

* Modified service to cater for org vault

* Updated to include new dependency

* Updated components to use the observable

* Added check on the cli to know if user has rights to delete an item

* Renamed abstraction and renamed implementation to include Default

Fixed permission issues

* Fixed test to reflect changes in implementation

* Modified base classes to use new naming

Passed new parameters for the canDeleteCipher

* Modified base classes to use new naming

Made changes from base class

* Desktop changes

Updated reference naming

* cli changes

Updated reference naming

Passed new parameters for the canDeleteCipher$

* Updated references

* browser changes

Updated reference naming

Passed new parameters for the canDeleteCipher$

* Modified cipher form dialog to take in active collection id

used canDeleteCipher$ on the vault item dialog to disable the delete button when user does not have the required permissions

* Fix number of arguments issue

* Added active collection id

* Updated canDeleteCipher$ arguments

* Updated to pass the cipher object

* Fixed up refrences and comments

* Updated dependency

* updated check to canEditUnassignedCiphers

* Fixed unit tests

* Removed activeCollectionId from cipher form

* Fixed issue where bulk delete option shows for can edit users

* Fix null reference when checking if a cipher belongs to the unassigned collection

* Fixed bug where allowedCollection passed is undefined

* Modified cipher by adding a isAdminConsoleAction argument to tell when a reuqest comes from the admin console

* Passed isAdminConsoleAction as true when request is from the admin console
2024-10-22 09:15:15 -04:00
Shane Melton
a884fcf664 [PM-11203] Hide collection/item checkboxes in Admin Console (#10970)
* [PM-11203] Hide collection/item checkboxes in AC when a user does not have manage/edit permissions for the collection/item

* [PM-11203] Remove restrict-provider-access flag

* [PM-11203] Adjust the editableItems array to use existing canEdit and canDelete helpers to determine eligibility
2024-10-14 10:02:32 -07:00
Thomas Rittson
7c72795d1c [PM-12747] Move CollectionService and models to AC Team (#11278) 2024-10-08 10:14:39 -04:00
Shane Melton
a83646be33 [PM-13253] Ensure the bulk menu is enabled when showBulkEditCollectionAccess is true (#11448) 2024-10-08 09:50:22 -04:00
Shane Melton
bf042ef7fa Revert "[PM-11201] Add the ability to sort by Name, Group, and Permission wit…" (#11445)
This reverts commit 37faccb7e9.
2024-10-07 11:45:15 -07:00
SmithThe4th
37faccb7e9 [PM-11201] Add the ability to sort by Name, Group, and Permission within the collection and item tables (#11370)
* Added sorting to vault, name, permission and group

Added default sorting

* Fixed import

* reverted test on template

* Only add sorting functionality to admin console

* changed code order
2024-10-07 11:10:48 +02:00
cd-bitwarden
a23991a64b [pm-10995] feature flag removal (#11000)
* Removing feature flag

* Removing flag from feature-flag.enum.ts

* suggested changes

* prettier

* fixing merge conflict issue

* Removing unused code

* suggested change from Gbubemi

* Adding back merge conflict code

* fixing prettier styling
2024-10-02 12:55:54 -04:00
Thomas Rittson
363acf58f9 [PM-12740] Move CollectionAdminService to AC Team (#11269) 2024-10-01 18:07:13 -04:00
SmithThe4th
7ae427e713 Revert "[PM-11200] Move delete item permission to Can Manage (#10890)" (#11155)
* Revert "[PM-11200] Move delete item permission to Can Manage (#10890)"

This reverts commit 8921230b4f.

* Removed provider access
2024-09-19 13:27:08 -04:00
Shane Melton
8e4dab5eba [PM-10996] Remove restrict-provider-access feature flag (#10977) 2024-09-11 10:45:23 -07:00
SmithThe4th
8921230b4f [PM-11200] Move delete item permission to Can Manage (#10890)
* Refactored the showDelete function to check if a user can manage a collection

Removed the can edit or manage cipher check from the show delete function

* Add check for AC vault to return true when user has admin access

* Check user is an admin or custom user with editAnyCollection

* Check user is an admin or custom user with editAnyCollection
2024-09-10 14:15:01 -04: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
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
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
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
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
Thomas Rittson
a852493211 Fix build error (#9150) 2024-05-13 10:22:01 -04: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
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
Shane Melton
89df0e4fad [AC-1623] Introduce Clone option to individual vault for organization items (#8608)
* [AC-1623] Remove cloneableOrganizationCiphers property
and update canClone to reflect new clone permission logic

* [AC-1623] Remove allowOwnershipAssignment override in orgVault as the same restrictions apply to both vaults

* [AC-1623] Ensure ownershipOptions are restricted for non-admins when cloning an org cipher item
2024-05-01 08:40:12 -07:00
Thomas Rittson
32981ce30d [AC-2320] Update canEditAnyCollection logic for Flexible Collections v1 (#8394)
* also update calling locations to use canEditAllCiphers where applicable
2024-04-04 13:48:41 +10:00
Thomas Rittson
5cb2e99b2f [AC-1724] Remove BulkCollectionAccess feature flag (#8502) 2024-03-28 08:08:28 +10:00