Commit Graph

142 Commits

Author SHA1 Message Date
Thomas Rittson c21a58f2fb
Use refCount: true to avoid potential memory leak (#8796) 2024-04-26 08:36:57 +10:00
Ike 1e4158fd87
[PM-5735] Create kdf Service (#8715)
* key connector migration initial

* migrator complete

* fix dependencies

* finalized tests

* fix deps and sync main

* clean up definition file

* fixing tests

* fixed tests

* fixing CLI, Browser, Desktop builds

* fixed factory options

* reverting exports

* implemented UserKeyDefinition clearOn

* Initial Kdf Service Changes

* rename and account setting kdfconfig

* fixing tests and renaming migration

* fixed DI ordering for browser

* rename and fix DI

* Clean up Migrations

* fixing migrations

* begin data structure changes for kdf config

* Make KDF more type safe; co-author: jlf0dev

* fixing tests

* Fixed CLI login and comments

* set now accepts userId and test updates

---------

Co-authored-by: Jake Fink <jfink@bitwarden.com>
2024-04-25 11:26:01 -07:00
Alex Morask a8ba48898b
Use new endpoint to determine SM standalone (#8904) 2024-04-24 16:29:00 -04:00
vinith-kovan 38ea110755
migrating two factor authentication component (#8760) 2024-04-23 19:22:26 +05:30
Alex Morask adb1ee3d38
[AC-2420] Hide SM checkbox on member invite when org is on SM Standalone (#8644)
* Refactoring

* Hide SM toggle on member invite and default to true for SM standalone org

* changed from hide sm checkbox to default and disable

* Removed errant addition from conflict resolution
2024-04-18 11:21:11 -04:00
Thomas Rittson 83b3fd83e4
Delete unused SettingsComponents (#8778) 2024-04-18 09:53:40 +10:00
cyprain-okeke a72b7f3d21
[AC-1218] Add ability to delete Provider Portals (#8685)
* initial commit

* add changes from running prettier

* resolve the linx issue

* resolve the lint issue

* resolving lint error

* correct the redirect issue

* resolve pr commit

* Add a feature flag

* move the new component to adminconsole

* resolve some pr comments

* move the endpoint from ApiService to providerApiService

* move provider endpoints to the provider-api class

* change the header

* resolve some pr comments
2024-04-17 14:07:26 +01:00
Thomas Rittson 4db383850f
[AC-2172] Member modal - limit admin access (#8343)
* limit admin permissions to assign members to collections that the admin
doesn't have can manage permissions for
2024-04-17 11:03:48 +10:00
Thomas Rittson f45eec1a4f
[AC-2169] Group modal - limit admin access - members tab (#8650)
* Restrict user from adding themselves to existing group
2024-04-17 09:31:48 +10:00
Shane Melton 2e8d1a2061
[AC-2431] New collection dialog bug (#8648)
* [AC-2431] Add null check for convertToPermission helper

* [AC-2431] Only attempt to convertToPermission if collectionId has a value
2024-04-12 16:51:20 +01:00
Conner Turnbull b914260705
[AC-2319] remove the owned by business checkbox business name (#8674)
* Removed business name from organization create/upgrade flows, and org info page

* Prefilling the logged in user's email to the billing email when creating an organization
2024-04-12 10:17:38 -04:00
Addison Beck bf11b90c43
Use `UserVerificationDialogComponent` for account recovery enrollment (#8632) 2024-04-12 06:38:53 -05:00
SmithThe4th 2bce6c538c
[PM-6194] Refactor injection of services in browser services module (#8380)
* refactored injector of services on the browser service module

* refactored the search and popup serach service to use state provider

* renamed back to default

* removed token service that was readded during merge conflict

* Updated search service construction on the cli

* updated to use user key definition

* Reafctored all components that refernce issearchable

* removed commented variable

* added uncommited code to remove dependencies not needed anymore

* added uncommited code to remove dependencies not needed anymore
2024-04-10 14:02:46 +01:00
Vincent Salucci 0c291bf79b
[AC-2086] Limit admin access - Collection Modal (#8335)
* feat: add view collection string, update button text, refs AC-2086

* feat: remove canEdit from Restricted Collection Access component, refs AC-2086

* feat: add view collection clicked flow, refs AC-2086

* fix: revert accidental svg icon changes, refs AC-2086

* feat: add input for access selector to hide multi select, refs AC-2086

* feat: apply readonly/disabled changes to access dialog, refs AC-2086

* fix: messages file conflict, refs AC-2086

* feat: apply disabled state to access selector, refs AC-2086

* fix: formatting, refs AC-2086

* fix: permission mode read only relocate, refs AC-2086

* fix: conform readonly casing, refs AC-2086
2024-04-08 13:24:27 -05:00
Oscar Hinton 7064b595da
[SM-1031] Remove SecretsManager & showDDG compile flags (#8610)
Remove old compile flags which should no longer be required, and may even cause issues. secretsManager: false hides the app switcher which is now used for more than just secrets manager.
2024-04-08 17:46:24 +02:00
Victoria League 09169cac71
[CL-254] Rename 500 colors to 600 to prep for UI redesign (#8623)
* [CL-254] Rename 500 colors to 600 to prep for UI redesign

---------

Co-authored-by: Will Martin <contact@willmartian.com>
2024-04-05 10:58:32 -04:00
Colton Hurst fb51aa570d
SM-1159: Rename Service Accounts to Machine Accounts (#8444)
* SM-1159: Rename service accounts to machine accounts. Visible text only.

* SM-1159: Second round of adding service to machine account renames

* SM-1159: Change title

* SM-1159: Fix typo

* SM-1159: Add more keys

* SM-1159: Reordered keys

* SM-1159: Keys update
2024-04-05 10:52:21 -04:00
Oscar Hinton bf2f570b61
[PM-7057] Add dev tool for toggling width in web vault (#8447)
Add a dev tool for toggling the web vault width. This allows developers and designers to experiment with how the vault currently behaves with responsiveness and ensure new functionality looks good.
2024-04-04 16:40:21 +02:00
Rui Tomé ff3ff89e20
[AC-1913] Update OrganizationLayoutComponent to use PolicyService to check if the user has the SingleOrg policy and use the value to hide the 'New Org' button (#8349) 2024-04-03 15:51:21 +01:00
Vincent Salucci 2f3e37d713
[SM-889] FIX - bulk activate SM members (#8375)
* fix: add accessSecretsManager property and filter checked users, refs SM-889

* fix: load members list on bulk sm complete, refs SM-889
2024-04-02 14:58:54 -05:00
Matt Gibson 62ad39e697
Ps/pm 5965/better config polling (#8325)
* Create tracker that can await until expected observables are received.

* Test dates are almost equal

* Remove unused class method

* Allow for updating active account in accout service fake

* Correct observable tracker behavior

Clarify documentation

* Transition config service to state provider

Updates the config fetching behavior to be lazy and ensure that any emitted value has been updated if older than a configurable value (statically compiled).

If desired, config fetching can be ensured fresh through an async.

* Update calls to config service in DI and bootstrapping

* Migrate account server configs

* Fix global config fetching

* Test migration rollback

* Adhere to implementation naming convention

* Adhere to abstract class naming convention

* Complete config abstraction rename

* Remove unnecessary cli config service

* Fix builds

* Validate observable does not complete

* Use token service to determine authed or unauthed config pull

* Remove superfluous factory config

* Name describe blocks after the thing they test

* Remove implementation documentation

Unfortunately the experience when linking to external documentation is quite poor. Instead of following the link and retrieving docs, you get a link that can be clicked to take you out of context to the docs. No link _does_ retrieve docs, but lacks indication in the implementation that documentation exists at all.

On the balance, removing the link is the better experience.

* Fix storybook
2024-03-27 10:03:09 -07:00
Daniel James Smith c6327d7f12
[PM-6780][PM-6781] Create vault-export-ui package / Migrate export-scope-callout.component to CL (#8318)
* PM-6780 - Create vault-export-ui package

* Migrate export-scope-callout to CL
- Move export-scope-callout.component to vault-export-UI
- Use bit-callout instead of app-callout
- Make component standalone
- Remove from jslib.module
- Prefix selector with team-name
- Export it from vault-export-ui

* Update usage of tools-export-scope-callout for desktop

* Update usage of tools-export-scope-callout for web

* Update usage of tools-export-scope-callout for browser

* Change package description

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-03-20 22:11:57 +00:00
Addison Beck bf2d2cfbed
Migrate `autoConfirmFingerPrints` to `StateProvider` (#8337)
* Fix a typo in the `StateDefinition` description

* Introduce `OrganizationManagementPreferencesService`

* Declare `OrganizationManagementPreferencesService` in DI

* Update `autoConfirmFingerPrints` logic in emergency access files

* Update `autoConfirmFingerPrints` logic in `people` files

* Remove `autoConfirmFingerPrints` from `StateService` and `Account`

* Migrate existing client data for `autoConfirmFingerPrints`

* Update apps/web/src/app/admin-console/organizations/manage/user-confirm.component.ts

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

* Update apps/web/src/app/admin-console/organizations/manage/user-confirm.component.ts

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

* Use `set` instead of `update` for function names

---------

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
2024-03-19 17:37:35 -04:00
Thomas Rittson b95dfd9d30
[AC-2276] Move policyService helper methods to domain object (#8254)
* Move mapPolicyFromResponse and mapPoliciesFromToken to static factory methods
2024-03-19 12:19:32 +10:00
Addison Beck c7abdb9879
Migrate OrganizationService to StateProvider (#7895) 2024-03-18 17:58:33 +01:00
Conner Turnbull b99153a016
[AC-2156] Billing State Provider Migration (#8133)
* Added billing account profile state service

* Update usages after removing state service functions

* Added migrator

* Updated bw.ts and main.background.ts

* Removed comment

* Updated state service dependencies to include billing service

* Added missing mv3 factory and updated MainContextMenuHandler

* updated autofill service and tests

* Updated the remaining extensions usages

* Updated desktop

* Removed subjects where they weren't needed

* Refactored billing service to have a single setter to avoid unecessary emissions

* Refactored has premium guard to return an observable

* Renamed services to match ADR

f633f2cdd8/docs/architecture/clients/presentation/angular.md (abstract--default-implementations)

* Updated property names to be a smidgen more descriptive and added jsdocs

* Updated setting of canAccessPremium to automatically update when the underlying observable emits

* Fixed build error after merge conflicts

* Another build error from conflict

* Removed autofill unit test changes from conflict

* Updated login strategy to not set premium field using state service

* Updated CLI to use billing state provider

* Shortened names a bit

* Fixed build
2024-03-15 14:53:05 -05:00
aj-bw 65534a1323
[AC-2304] added User Status check to revoke-restore as well as remove components (#8347) 2024-03-15 13:06:29 -04:00
Jonathan Prusik ac7d80980d
remove unused services (#8334) 2024-03-15 14:11:16 +00:00
Thomas Rittson c010045e7e
Fix null error when inviting member (#8342) 2024-03-15 14:36:14 +10:00
Thomas Rittson 5506842623
[AC-2171] Member modal - limit admin access - editing self (#8299)
* If editing your own member modal, you cannot add new collections or groups
  * Update forms to prevent this
  * Add helper text
* Delete unused api method
2024-03-15 09:33:15 +10:00
Thomas Rittson 7ced8d5cc9
[AC-2243] Refactor member modal loading logic (#8087)
* Move loadOrganizationUser into own method

* Simplify logic and use observables more

* Move init logic into ctor instead of ngOnInit
2024-03-11 22:32:21 -05:00
Thomas Rittson e0186b3a8e
[AC-2244] Fix submitting member invite form (#8009)
* Fix invite member dialog not submitting on enter

updateOn: onBlur is unnecessary with component library forms
and was preventing the form from being submitted without deselecting
the email field

* Simplify name for validator
2024-03-06 12:54:36 +10:00
SmithThe4th e6a569b153
[PM-6584] [PM-6632] [Defects] Vertical Vault Refresh Product Switcher (#8198)
* removed org enabled check from acOrg logic

* fixed bug where organization doesn't show on admin console for users admin custom permissions
2024-03-05 09:38:38 -05:00
Alex Morask 7cfe862aa6
[PM-5971] Fix Payment Method Warning Bugs (#7923)
* Rework implementation of payment method warnings

* Move payment-method-warnings.component to module

* Moved timer/subscribe to app.component

* Remove unrelated refactoring

* Remaining feedback

* Add paymentMethodWarningsService tests

* Thomas' feedback

* fix tests

* Use barrel file imports

* Make banner work with new vault navigation

* Matt's feedback
2024-02-29 08:18:47 -05:00
Shane Melton 6ba0d1cbbe
[PM-6397] [AC-2141] [PM-6449] VVR Design Follow Up Fixes (#8077)
* [AC-2141] Re-order products in product switcher

* [PM-6397] Fix missing accessibility text

* [PM-6449] Fix casing on left side nav
2024-02-23 14:43:14 -08:00
Oscar Hinton 38d8fbdb5a
Vertical Vault Navigation (#6957)
* WIP admin console layout

* Update icons

* Migrate more things

* Migrate the last pages

* Move header to web

* Fix story not working

* Convert header component to standalone

* Migrate org layout to standalone

* Enable org switcher

* Add AC to product switcher

* Migrate provider portal to vertical nav

* Migrate PM

* Prettier fixes

* Change AC and PP to use secondary variant layout & update logos

* Remove full width setting

* Remove commented code

* Add header to report pages

* Add provider portal banner

* Fix banner for billing pages

* Move vault title to header

* Prevent scrollbar jumping

* Move send button to header

* Replace search input with bit-search

* Remove unused files and css

* Add banner

* Tweak storage option

* Fix duplicate nav item after merge

* Migrate banner state to state provider framework

* [AC-2078] Fix device approvals header

* [PM-5861] Hide AC from product switcher for users that do not have access

* [PM-5860] Fix Vault and Send page headers

* [AC-2075] Fix missing link on reporting nav group

* [AC-2079] Hide Payment Method and Billing History pages for self-hosted instances

* [AC-2090] Hide reports/event log nav items for users that do not have permission

* [AC-2092] Fix missing provider portal option in product switcher on page load

* Add null check for organization in org layout component

* [AC-2094] Fix missing page header for new client orgs page

* [AC-2093] Update New client button styling

* Fix failing test after merge

* [PM-2087] Use disk-local for web layout banner

* [PM-6041] Update banner copy to read "web app"

* [PM-6094] Update banner link to marketing URL

* [PM-6114] add CL container component to VVR pages (#7802)

* create bit-container component

* add container to all page components

* Fix linting errors after merge with main

* Fix product switcher stories

* Fix web-header stories

* mock org state properly in product switcher stories (#7956)

* refactor: move web layout migration banner logic into a service (#7958)

* make CL codeowner of web header files

* move migration banner logic to service; update stories

* [PM-5862] Ensure a sync has run before hiding navigation links

* Remove leftover banner global state

* Re-add dropped selfHosted ngIf

* Add rel noreferrer

* Remove comment

---------

Co-authored-by: Shane Melton <smelton@bitwarden.com>
Co-authored-by: Will Martin <contact@willmartian.com>
2024-02-23 09:22:45 -08:00
Oscar Hinton 02dde0c0d3
[PM-6328] Checkmarx - Resolve warnings (#7941) 2024-02-15 16:25:53 -05:00
Daniel James Smith 9980c3feb9
[PM-5459] Move libs/exporter to libs/tools/ (#7380)
* Move libs/exporter into libs/tools/*

Migrating all files from libs/exporter over to libs/tools/export/vault-export/vault-export-core
Rename package to vault-export-core
Fix all file paths

* Update libs and tsconfig imports

* Fix client imports

* Fix eslint, jest and package-lock.json

* Update CODEOWNERS

* Add README.md to whitelist-capital-letters

* Fix vault-export-service tests not running

* Update libs/tools/export/vault-export/README.md

Co-authored-by: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com>

* Fix types imports

* Export types from vault-export-core

* Fixed content of README

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com>
2024-02-13 14:22:37 -05:00
Alex Morask 373a865a76
Temporarily remove payment method warning banners (#7912) 2024-02-12 11:35:08 -05:00
Vincent Salucci 6b7edced8e
feat: remove collection enhancements beta badge, refs AC-2192 (#7896) 2024-02-09 15:41:02 -06:00
Vincent Salucci 783ae104a3
feat: add confirm collection enhancements dialog, refs AC-2113 (#7884) 2024-02-09 09:14:33 -06:00
Shane Melton c2ed6383c6
[AC-2117] Update access selector to update permission list when flexible collections flag is updated (#7847) 2024-02-08 09:35:38 -08:00
Will Martin cb8849c355
Add eslint rule no-floating-promises (#7789)
* add eslint rule no-floating-promises

* add eslint-disable comment to offending lines
2024-02-02 15:13:37 -05:00
aj-rosado 305fd39871
[AC-1782] Flexible collections import behavior in Password Manager and Admin Console (#6888)
* Added logic to only return organisations where user has import permissions and collections that he manages on Import

* Changed the UnassignedCollections validation logic

* Added validation to check if the user is coming from AdminConsole on the import component

* Added import collection service abstraction to allow get admin collections

* Corrected feature flag reads on import component

* Refactor import component methods ngOnInit and performImport to improve codescene
Using FeatureFlag Observable

* Modified validation to allow import if user has organizations to import into

* Using the new organization flexiblecollections property on import

* Created collection-admin-import.service to return all the org collections to the import on Admin Console

* Small changes on import flexible collections

* Fix linting issues

* changed canAccessImport rules and deprecated canAccessImportExport

* Validating if user canAccessImportExport instead of admin before calling the handleOrganizationImportInit.

* AC-2095 - Corrected getAllAdminCollections from ImportCollectionAdminService to properly get all the collections on AdminConsole

* Reverting AC-2095

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-01-29 15:11:19 +00:00
aj-rosado d5de9cbeb2
[AC-1492] Split export service (#7462)
* Split export service into vault and org export service

* Changed CLI logic to use split export logic

* correct unit tests

* Created individual export service, export service making the calls for org and ind vault

* Improved code readability

* Merged PasswordProtectedExport with Export methods to simplify calls

* Some small refactor

* [AC-1492] Managed collections export (#7556)

* Added managed collections export method
Added logic to show orgs on export that the user can export from

* Merge branch 'tools/AC-1492/split-export-services' into tools/AC-1492/export-flexible-collections

# Conflicts:
#	apps/web/src/app/admin-console/organizations/tools/vault-export/org-vault-export.component.ts
#	apps/web/src/app/tools/vault-export/export.component.ts

* Change export to use new organization.flexiblecollection flag

* Little refactor changing parameter names and reduzing the size of export.component.ts ngOnInit

* Removed unused service from export constructor and removed unnecessary default value from org export service parameter

* Simplified organizations selection for vault export to only verify if it has flexiblecollections

* removed unecessary services from ExportComponent constructor on popup

* Fixed possible race condition on managed export
2024-01-29 09:38:16 +00:00
Thomas Rittson bcb232cc80
[AC-2026] Add flexible collections opt-in UI (#7443) 2024-01-25 16:56:31 +10:00
Alex Morask 014281cb93
[AC-1758] Show banner when organization requires a payment method (#7088)
* Add billing banner states to account settings

* Add billing banner service

* Add add-payment-method-banners.component

* Use add-payment-method-banners.component in layouts

* Clear banner on payment method addition

* Ran prettier after CI update

* Finalize banners styling/translations

* Will's (non-Tailwind) feedback

* Review feedback

* Review feedback

* Review feedback

* Replace StateService with StateProvider in BillingBannerService

* Remove StateService methods
2024-01-23 12:47:52 -05:00
Oscar Hinton 7bb4ea842f
[PM-3919] Remove deprecated Angular functionality from ModalService (#6285)
Remove deprecated Angular functionality from ModalService so we can upgrade Angular.
2024-01-22 09:36:42 +00:00
Thomas Rittson ee4aa31444
[AC-2027] Update Flexible Collections logic to use organization property (#7445)
* Remove unused feature flag

* Replace feature flag ref with org flag

* Remove deprecated feature flag to discourage use

* Add check to org.canCreateNewCollections

* Adjust init logic of components to avoid race conditions

* Make canCreateNewCollections logic more explicit

* Resolve merge conflicts with vault changes

* Update comments

* Remove uses of old feature flag

* Remove last of old feature flag

* Clean up feature flag

* Fix linting

* Fix linting
2024-01-17 12:33:39 +00:00
Matt Gibson 160a636fa0
Move key types to central location (#7531) 2024-01-17 07:27:44 -05:00