* Sent initiation path for organization and user signups
* Rename organizationQueryParameter > organizationTypeQueryParameter
* Jared's feedback
* Split PM & SM initiation path
* [AC-2195] Update canEditAnyCipher permission to make an exception for Custom users with editAnyCollection permission
* [AC-2195] Update V1 FC flag check to include check for an organization's FC status
* [AC-2195] Remove redundant collection management setting check that was hiding the restricted access message for custom users with deleteAnyCollection
* [AC-2195] Ensure users with canEditAnyCollections can edit all collections
* Begin migration of autofill settings
Co-authored-by: Cesar Gonzalez <cagonzalezcs@users.noreply.github.com>
Co-authored-by: Thomas Avery <Thomas-Avery@users.noreply.github.com>
Co-authored-by: Jonathan Prusik <jprusik@users.noreply.github.com>
Co-authored-by: Colton Hurst <coltonhurst@users.noreply.github.com>
* add browser dependency for AutofillSettingsService
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
* update autofill settings service
* replace usages of stateService get/set autofillOnPageLoad with autofillSettingsService
* replace usages of stateService get/set autofillOnPageLoadDefault with autofillSettingsService
* replace usages of stateService get/set autoCopyTotp with autofillSettingsService
* replace usages of stateService get/set autoFillOnPageLoadCalloutIsDismissed with autofillSettingsService
* replace usages of stateService get/set activateAutoFillOnPageLoadFromPolicy with autofillSettingsService
* replace usages of get/set autoFillOverlayVisibility with autofillSettingsService
* inlineMenuVisibility should use global state
* add the AutofillSettingsService to background scripts
* fix typing
* replace additional usages of get/set autoFillOverlayVisibility and disableAutoTotpCopy with autofillSettingsService equivalents
* replace additional usages of get/set autofillOnPageLoadDefault with autofillSettingsService equivalent
* replace additional usages of get/set activateAutoFillOnPageLoadFromPolicy with autofillSettingsService equivalent
* remove additional deprecated and unused state service calls
* improve naming conventions and consistency
* fix missing mock for policy service test
* replace missing overlay background tests
* cleanup
* fix double inversion
* fix reference to wrong setter
* move handleActivateAutofillPolicy out of BrowserPolicyService
* create state migration script
* resolve linting issues
* remove migrated setting properties
* add AutofillSettingsSErvice to jslib-services
* handle conditional content script loading via autofillOnPageLoad check
* add deprecated note to getFromLocalStorage
* add jsdoc decorators to new autofill service methods
* handle undefined globalState
* move autofill settings out of BrowserPolicyService
* Move autofill settings code out of policyService
* fix tests
* fix typo in state definition
---------
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
Co-authored-by: Cesar Gonzalez <cagonzalezcs@users.noreply.github.com>
Co-authored-by: Thomas Avery <Thomas-Avery@users.noreply.github.com>
Co-authored-by: Colton Hurst <coltonhurst@users.noreply.github.com>
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
* [AC-1124] Add getManyFromApiForOrganization to cipher.service.ts
* [AC-1124] Use getManyFromApiForOrganization when a user does not have access to all ciphers
* [AC-1124] Vault changes
- Show new collection access restricted view
- Include unassigned ciphers for restricted admins
- Restrict collections when creating/cloning/editing ciphers
* [AC-1124] Update edit cipher on page navigation to check if user can access the cipher
* [AC-1124] Hide ciphers from restricted collections
* [AC-1124] Ensure providers are not shown collection access restricted view
* [AC-1124] Modify add-edit component to call the correct endpoint when a restricted admin attempts to add-edit a cipher
* [AC-1124] Fix bug after merge with main
* [AC-1124] Use private this._organization
* [AC-1124] Fix broken builds
* Wire up key definitions for OrganizationService
[`AC-2009`: Transition OrganizationService to use StateProvider](
https://bitwarden.atlassian.net/browse/AC-2009)
In order to support the new `StateProvider` APIs for managing
application state this commit modifies `OrganizationService` in the following
ways:
1. Adding a `KeyDefinition` object to `OrganizationService` to store the
`organization` record in `StateProvider`.
1. Injecting `StateProvider` and wiring up `OrganizationService` to read
from the `organizations` key definition for the active user account.
1. Expanding the capabilities of `OrganizationData` to be able to read
itself from a JSON string. Previously this was handled directly by
`StateService`.
1. Updating tests to include requirements for testing against
`StateProvider`.
1. Marking the existing `StateService`-backed `organizations`
`Observable` and `BehaviorSubject` as deprecated.
This is largely unimplemented code with no intended visible effects to
the system. Implementing getting & updating the `organizations` value
from `StateProvider` will the next step in this work.
* Rework null check on OrganizationData
* Remove deprecation signals for the time being
* Move key definition inline with its service
* Create date objects when deserialzing json from state
* Got trial page working without the form set up
* Set up the form to create SM subscription
* Add free SM trial page and sign up
* Conner's changes
* fixed imports
* Set isFromSecretsManagerTrial
* Fixed OrgKey location
* Add isFromSecretsManager prop to free org create
* Add LTO callout
* Switch LTO to background box
* Defect: AC-2081
* Fixed typo "Secrets Manger" to "Secrets Manager"
* Removed discount price logic for storage and secrets manager prices since they don't apply
---------
Co-authored-by: Conner Turnbull <133619638+cturnbull-bitwarden@users.noreply.github.com>
Co-authored-by: Conner Turnbull <cturnbull@bitwarden.com>
* 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>
* Move org keys to state providers
* Create state for org keys and derive decrypted for use
* Make state readonly
* Remove org keys from state service
* Migrate user keys state
* Review feedback
* Correct test name
* Refix key types
* `npm run prettier` 🤖
* 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
## Type of change
<!-- (mark with an `X`) -->
```
- [ ] Bug fix
- [ ] New feature development
- [x] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other
```
## Objective
<!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding-->
Final Client changes for Key Rotation Improvements.
- Introduces a new `KeyRotationService` that is responsible for owning rotation process.
- Moves `Send` re-encryption to the `SendService` (`KeyRotationService` shouldn't have knowledge about how domains are encrypted).
- Moves `EmergencyAccess` re-encryption to the `EmergencyAccessService`.
- Renames `AccountRecoveryService` to `OrganizationUserResetPasswordService` after feedback from Admin Console
## Code changes
<!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes-->
<!--Also refer to any related changes or PRs in other repositories-->
Auth
- **emergency-access-update.request.ts:** New request model for domain updates that includes Id
- **emergency-access.service.ts:** Moved `EmergencyAccess` re-encryption to the `EmergencyAccessService`. Add deprecated method for legacy key rotations if feature flag is off
- **key-rotation.service/api/spec/module:** New key rotation service for owning the rotation process. Added api service, module, and spec file.
- **update-key.request.ts:** Moved to Auth ownership. Also added new properties for including other domains.
- **migrate-legacy-encryption.component.ts:** Use new key rotation service instead of old component specific service. Delete old service.
- **change-password.component.ts:** Use new key rotation service.
- **settings.module.ts:** Import key rotation module.
Admin Console
- **organization-user-reset-password.service.ts/spec:** Responsible for re-encryption of reset password keys during key rotation. Added tests.
- **organization-user-reset-password-enrollment.request.ts:** New request model for key rotations
- **reset-password.component.ts:** Update `AccountRecoveryService` to `OrganizationUserResetPasswordService`
- **enroll-master-password-reset.component.ts:** Update `AccountRecoveryService` to `OrganizationUserResetPasswordService`
Tools
- **send.service/spec.ts:** Responsible only for re-encryption of sends during key rotation. Added tests.
Other
- **api.service.ts:** Move `postAccountKey` to `KeyRotationApiService`
- **feature-flag.enum.ts:** add new feature flag
## Screenshots
<!--Required for any UI changes. Delete if not applicable-->
## Before you submit
- Please add **unit tests** where it makes sense to do so (encouraged but not required)
- If this change requires a **documentation update** - notify the documentation team
- If this change has particular **deployment requirements** - notify the DevOps team
- Ensure that all UI additions follow [WCAG AA requirements](https://contributing.bitwarden.com/contributing/accessibility/)
* decompose password generator policy enforcement
* integrate new logic with UI
* improve UX of minimum password length
* improve password generator policy options documentation
* initialize min length to default minimum length boundary
* reset form value on input to prevent UI desync from model
---------
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* [AC-1139] Add new layout for MemberDialogComponent when FC feature flag is enabled
* [AC-1139] Deprecated Organization canEditAssignedCollections, canDeleteAssignedCollections, canViewAssignedCollections
* [AC-1139] Checking if FC feature flag is enabled when using canDeleteAssignedCollections or canViewAssignedCollections
* [AC-1139] Added missing parameter to customRedirect
* [AC-1139] Fixed canEdit permission
* [AC-1139] Fixed CanDelete logic
* [AC-1139] Changed canAccessVaultTab function to receive configService
* Override deprecated values on sync
* [AC-1139] Reverted change that introduced ConfigService as a parameter to canAccessVaultTab
* [AC-1139] Fixed circular dependency
* [AC-1139] Moved overriding of deprecated values to syncService
* Revert "[AC-1139] Fixed circular dependency"
This reverts commit 6484420976.
* Revert "Override deprecated values on sync"
This reverts commit f0c25a6996.
* [AC-1139] Added back the deprecation of methods canEditAssignedCollections, canDeleteAssignedCollections, canViewAssignedCollections
* [AC-1139] Reverted change on syncService
* [AC-1139] Override deprecated values on sync
* [AC-1139] Fix canDelete logic in
collection-dialog.component.ts and
bulk-delete-dialog.component.ts
* [AC-1139] Moved override logic from syncService to organizationService
* [AC-1139] Add ability to have titlecase titles on nested-checkbox.component checkboxes; use on member-dialog.component
* Revert "[AC-1139] Add ability to have titlecase titles on nested-checkbox.component checkboxes; use on member-dialog.component"
This reverts commit 9ede0fc5ac.
* [AC-1139] Fix bulk delete functionality
* [AC-1139] Refactor canEdit and canDelete to use ternary operator
* [AC-1139] Fix canDelete condition in VaultComponent
---------
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
Assign ownership to many of the remaining libs/common files.
Criteria for ownership:
* Files used by a single team, is now owned by that team.
* Files related to a domain owned by a team is now owned by that team.
* Where ownership is unclear the "lowest level" service takes ownership.
* PM-3275 - Policy.service - Refactor existing mapPoliciesFromToken internal logic to provide public mapPolicyFromResponse method
* PM-3275 - Add new PolicyApiService.getMasterPasswordPolicyOptsForOrgUser method for use in the set password comp
* PM-3275 - Update set-password.comp to use new policyApiService.getMasterPasswordPoliciesForInvitedUsers method
* PM-3275 - (1) Remove post TDE AuthN set password routing logic from SSO/2FA comps as we cannot set an initial user password until after decryption in order to avoid losing the ability to decrypt existing vault items (a new user key would be created if one didn't exist in memory) (2) Add set password routing logic post TDE decryption in LoginWithDevice/Lock components (3) Add new ForceResetPasswordReason to capture this case so that we can guard against users manually navigating away from the set password screen
* PM-3275 - SyncSvc - Add logic for setting forcePasswordReset reason if TDE user w/out MP went from not having MP reset permission to having it.
* PM-3275 - Rename ForceResetPasswordReason enum to ForceSetPasswordReason + update all references.
* PM-3275 - Removing client deprecated calls to getPoliciesByInvitedUser and helper call getMasterPasswordPoliciesForInvitedUsers
* PM-3275 - PolicyAPI service - remove no longer necessary getPoliciesByInvitedUser method
* PM-3275 - LockComp - TODO cleanup
* PM-3275 - SSO & 2FA comp - cleanup of incorrect routing path
* PM-3275 - (1) State service refactor - change getForcePasswordResetReason / setForcePasswordResetReason to be getForceSetPasswordReason / setForceSetPasswordReason (2) Sync Service - encapsulate setForceSetPasswordReasonIfNeeded logic into own method
* PM-3275 - SetPassword Comp - Rename "identifier" to be "orgSsoIdentifier" for clarity
* PM-3275 - SetPasswordComp - Moving routing from SSO / 2FA comps to Lock / LoginWithDevice comps results in a loss of the the OrgSsoId. However, as part of the TDE work, we added the OrgSsoId to state so use that as a fallback so we can accurately evaluate if the user needs to be auto enrolled in admin account recovery.
* PM-3275 - SetPasswordComp - add a bit more context to why/when we are reading the user org sso id out of state
* PM-3275 - SetPassword Comp - (1) Add forceSetPasswordReason and ForceSetPasswordReason enum as public props on the class so we can change copy text based on which is set + set forceSetPasswordReason on ngOnInit (2) Refactor ngOnInit to use a single RxJs observable chain for primary logic as the auto enroll check was occurring before the async getUserSsoOrganizationIdentifier could finish.
* PM-3275 - Desktop - App comp - missed replacing getForcePasswordResetReason with getForceSetPasswordReason
* PM-3275 - TDE Decryption Option Comps - must set ForceSetPasswordReason so that we can properly enforce keeping the user on the component + display the correct copy explaining the scenario to the user.
* PM-3275 - All Clients - SetPasswordComp html - Update page description per product + remove no longer used ssoCompleteRegistration translation.
* PM-3275 - SetPasswordComp - hopefully the final puzzle piece - must clear ForceSetPasswordReason in order to let user navigate back to vault.
* PM-3275 - SyncService - Remove check for previous value of account decryption options hasManageResetPasswordPermission as when a user logged in on a trusted device after having their permissions updated, the initial setting would be true and it would cause the flag to NOT be set when it should have.
* PM-3275 - TDE User Context - (1) Remove explicit navigation to set password screen from post decryption success scenarios on lock & login w/ device comps (2) Move TdeUserWithoutPasswordHasPasswordResetPermission flag setting to SSO / 2FA components to support both trusted and untrusted device scenarios (both of which are now caught by the auth guard).
* PM-3275 - (1) SetPassword comp - adjust set password logic for TDE users to avoid creating a new user asymmetric key pair and setting a new private key in memory. (2) Adjust SetPasswordRequest to allow null keys
* PM-3275 - Remove unused route from login with device comp
* PM-3275 - Sso & 2FA comp tests - Update tests to reflect new routing logic when TDE user needs to set a password
* PM-3275 - Lock comp - per PR feedback, remove unused setPasswordRoute property.
* PM-3275 - SetPasswordComp - Per PR feedback, use explicit null check
* PM-3275 - Per PR Feedback, rename missed forcePasswordResetReason to be forceSetPasswordReason on account model
* PM-3275 - Auth guard - rename forcePasswordResetReason to forceSetPasswordReason
* PM-3275 - SSO / 2FA comps - Per PR feedback, refactor Admin Force Password reset handling to be in one place above the TDE user flows and standard user flows as it applies to both.
* PM-3275 - Per PR feedback, clarify 2FA routing comment
* PM-3275 - Per PR feedback, update set-password comp ngOnInit switchMaps to just return promises as switchMap converts promises to observables internally.
* PM-3275 - Per PR feedback, refactor set password ngOnInit observable chain to avoid using async subscribe and instead simply sequence the calls via switchMap and tap for side effects.
* PM-3275 - Per PR feedback, move tap after filter so we can remove if check
* PM-3275 - Per PR feedback, update policy service mapping methods to use shorthand null checking.
* PM-3275 - SetPassword comp - (1) Move force set password reason logic into onSetPasswordSuccess(...) (2) On onSetPasswordSuccess, must set hasMasterPassword to true for user verification scenarios.
* PM-3275 - Per PR feedback, remove new hasManageResetPasswordPermission flag from profile response and instead simply read the information off the existing profile.organizations data as the information I needed was already present.
* PM-4633 - PolicyService - mapPolicyFromResponse(...) - remove incorrect null check for data. Policies with internal null data property should still be evaluated and turned into Policy objects or the policy array ends up having null values in it and it causes errors down the line on login after acct creation.
* [AC-1612] Disabled access to the Organization Vault tab if the user only has access to assigned collections
* [AC-1612] Fixed issue that prevented Manager users to access the Organizations tab
* Migrate callouts to the CL ones
* Add folder/collection selection
* Use bitTypography as page header/title
* Migrate submit button to CL
* Migrate fileSelector and fileContents
* Add ability to import into an existing folder/collection
Extended import.service and abstraction to receive importTarget on import()
Pass selectedImportTarget to importService.import()
Wrote unit tests
* Added vault selector, folders/collections selection logic and component library to the import
* Revert changes to the already migrated CL fileSelector, fileContents and header/title
* Fix fileContents input and spacing to submit button
* Use id's instead of name for tghe targetSelector
* Remove unneeded empty line
* Fix import into existing folder/collection
Map ciphers with no folder/no collection to the new rootFolder when selected by the user
Modified and added unit tests
* Added CL to fileSelector and fileInput on vault import
* Added reactive forms and new selector logic to import vault
* Added new texts on Import Vault
* Corrected logic on enable targetSelector
* Removing target selector from being required
* Fixed imports after messing up a merge conflict
* Set No-Folder as default
* Show icons (folder/collection) on targetSelector
* Add icons to vaultSelector
* Set `My Vault` as default of the vaultSelector
* Updates labels based on feedback from design
* Set `My Vault` as default of the vaultSelector pt2
* Improvements to reactive forms on import.component
* Only disabling individual vault import on PersonalOwnership policy
* Use import destination instead of import location
* Add hint to folder/collection dropdown
* Removed required attribute as provided by formGroup
* Display no collection option same as no folder
* Show error on org import with unassigned items
Only admins can have unassigned items (items with no collection)
If these are present in a export/backup file, they should still be imported, to not break existing behaviour. This is limited to admins.
When a member of an org does not set a root collection (no collection option) and any items are unassigned an error message is shown and the import is aborted.
* Removed for-attribute from bit-labels
* Removed bitInput from bit-selects
* Updates to messages.json after PR feedback
* Removed name-attribute from bit-selects
* Removed unneeded variables
* Removed unneeded line break
* Migrate form to use bitSubmit
Rename old submit() to performImport()
Create submit arrow function calling performImport() (which can be overridden/called by org-import.component)
Remove #form and ngNativeValidate
Add bitSubmit and bitFormButton directives
Remove now unneeded loading variable
* Added await to super.performImport()
* Move form check into submit
* AC-1558 - Enable org import with remove individual vault policy
Hide the `My Vault` entry when policy is active
Always check if the policy applies and disable the formGroup if no vault-target is selectable
* [AC-1549] Import page design updates (#5933)
* Display select folder/collection in targetSelector
Filter the no-folder entry from the folderViews-observable
Add labels for the targetSelector placeholders
* Update importTargetHint and remove importTargetOrgHint
* Update language on importUnassignedItemsError
* Add help icon with link to the import documentation
---------
Co-authored-by: Andre Rosado <arosado@bitwarden.com>
* [AC-1423] Update organization subscription cloud page (#5614)
* [AC-1423] Add ProgressModule to shared.module.ts
* [AC-1423] Update cloud subscription page styles
- Remove bootstrap styles
- Use CL components where applicable
- Use CL typography directives
- Update heading levels to prepare for new SM sections
* [AC-1423] Add usePasswordManager boolean to organization domain
* [AC-1423] Introduce BitwardenProductType enum
* [AC-1423] Update Organization subscription line items
- Add product type prefix
- Indent addon services like additional storage and service accounts
- Show line items for free plans
* [AC-1423] Simply sort function
* [AC-1423] Remove header border
* [AC-1423] Make "Password Manager" the default fallback for product name
* [AC-1420] Add Secrets Manager subscribe component (#5617)
* [AC-1418] Add secrets manager manage subscription component (#5661)
* [AC-1423] Add minWidth input to bit-progress component
* [AC-1423] Add ProgressModule to shared.module.ts
* [AC-1423] Update cloud subscription page styles
- Remove bootstrap styles
- Use CL components where applicable
- Use CL typography directives
- Update heading levels to prepare for new SM sections
* [AC-1423] Add usePasswordManager boolean to organization domain
* [AC-1423] Introduce BitwardenProductType enum
* [AC-1423] Update Organization subscription line items
- Add product type prefix
- Indent addon services like additional storage and service accounts
- Show line items for free plans
* [AC-1423] Simply sort function
* [AC-1423] Remove header border
* [AC-1423] Remove redundant condition
* [AC-1423] Remove ineffective div
* [AC-1423] Make "Password Manager" the default fallback for product name
* Revert "[AC-1423] Add minWidth input to bit-progress component"
This reverts commit 95b2223a30.
* [AC-1423] Remove minWidth attribute
* [AC-1423] Switch to AddonProductType enum instead of boolean
* Revert "[AC-1423] Switch to AddonProductType enum instead of boolean"
This reverts commit 204f64b4e7.
* [AC-1423] Tweak sorting comment
* [AC-1418] Add initial SecretsManagerAdjustSubscription component
* [AC-1418] Add initial SM adjustment form
* [AC-1418] Adjust organization-subscription-update.request.ts to support both PM and SM
* [AC-1418] Rename service account fields in the options interface
* [AC-1418] Add api service call to update SM subscription
* [AC-1418] Cleanup form html
* [AC-1418] Add missing SM plan properties
* [AC-1418] Add SM subscription adjust form and logic to hide it
* [AC-1418] Add better docs to options interface
* [AC-1418] Fix conflicting required/optional labels for auto-scaling limits
* [AC-1418] Adjust labels and appearance to better match design
* [AC-1418] Use the SM plan for billing interval
* [AC-1418] Hide SM billing adjustment component behind feature flag
* [AC-1418] Update request model to match server
* [AC-1418] Cleanup BitwardenProductType after merge
Add to barrel file and update applicable imports.
* [AC-1418] Revert change to update PM subscription request model
* [AC-1418] Add new update SM subscription request model
* [AC-1418] Add new service method to update SM subscription
* [AC-1418] Use new model and service method
* [AC-1418] Cleanup SM subscription UI flags
* [AC-1418] Move SM adjust subscription component into SM billing module
* [AC-1418] Update SM seat count minimum to 1
* [AC-1418] Add missing currency codes
* [AC-1418] Simplify monthly price calculation
* [AC-1418] Increase PM adjust subscription form input width
* [AC-1418] Add check for null subscription
---------
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* add the additional properties (#5743)
* Allow autoscale limits to be removed, update naming (#5781)
* [AC-1488] Store Organization.SmServiceAccounts as total not additional (#5784)
* Allow autoscale limits to be removed, update naming
* Display additional service accounts only
---------
Co-authored-by: Shane Melton <smelton@bitwarden.com>
* [AC-1473] SM beta ending callout (#5719)
* [AC-1423] Add minWidth input to bit-progress component
* [AC-1423] Add ProgressModule to shared.module.ts
* [AC-1423] Update cloud subscription page styles
- Remove bootstrap styles
- Use CL components where applicable
- Use CL typography directives
- Update heading levels to prepare for new SM sections
* [AC-1423] Add usePasswordManager boolean to organization domain
* [AC-1423] Introduce BitwardenProductType enum
* [AC-1423] Update Organization subscription line items
- Add product type prefix
- Indent addon services like additional storage and service accounts
- Show line items for free plans
* [AC-1423] Simply sort function
* [AC-1423] Remove header border
* [AC-1423] Remove redundant condition
* [AC-1423] Remove ineffective div
* [AC-1423] Make "Password Manager" the default fallback for product name
* Revert "[AC-1423] Add minWidth input to bit-progress component"
This reverts commit 95b2223a30.
* [AC-1423] Remove minWidth attribute
* [AC-1423] Switch to AddonProductType enum instead of boolean
* Revert "[AC-1423] Switch to AddonProductType enum instead of boolean"
This reverts commit 204f64b4e7.
* [AC-1423] Tweak sorting comment
* [AC-1418] Add initial SecretsManagerAdjustSubscription component
* [AC-1418] Add initial SM adjustment form
* [AC-1418] Adjust organization-subscription-update.request.ts to support both PM and SM
* [AC-1418] Rename service account fields in the options interface
* [AC-1418] Add api service call to update SM subscription
* [AC-1418] Cleanup form html
* [AC-1418] Add missing SM plan properties
* [AC-1418] Add SM subscription adjust form and logic to hide it
* [AC-1418] Add better docs to options interface
* [AC-1418] Fix conflicting required/optional labels for auto-scaling limits
* [AC-1418] Adjust labels and appearance to better match design
* [AC-1418] Use the SM plan for billing interval
* [AC-1418] Hide SM billing adjustment component behind feature flag
* [AC-1418] Update request model to match server
* [AC-1418] Cleanup BitwardenProductType after merge
Add to barrel file and update applicable imports.
* [AC-1418] Revert change to update PM subscription request model
* [AC-1418] Add new update SM subscription request model
* [AC-1418] Add new service method to update SM subscription
* [AC-1418] Use new model and service method
* [AC-1418] Cleanup SM subscription UI flags
* [AC-1418] Move SM adjust subscription component into SM billing module
* [AC-1418] Update SM seat count minimum to 1
* [AC-1418] Add missing currency codes
* [AC-1418] Simplify monthly price calculation
* add daysRemaining util function and unit tests
* [AC-1474] update organization models to include SM beta flag
* add SM beta callout to org subscription page
* update messages.json
* remove beta field from profile org response
* improve daysRemaining code clarity
* set SM beta in org model constructor
* tweak free SM row visibility
* refactor callout description
* Revert "remove beta field from profile org response"
This reverts commit 6c6249e1ec.
* fix dates
* [AC-1468]: hide adjust SM component if beta user
* add sm beta field to org sub response; remove everywhere else
* fix copy
---------
Co-authored-by: Shane Melton <smelton@bitwarden.com>
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
* [AC-1531] Fix SM subscribe component not showing in free org billing tab (#5848)
Also:
* Fix spacing in layout
* Send zero values for free plans
* Fix: properly delete enroll component
* remove the beta end message for free org (#5877)
* [AC-1458] Update local organization data after subscribing to Secrets Manager (#5888)
* [AC-1567] Fix max additional service account cost estimate (#5923)
* Fix max additional service account cost estimate
* Update i18n string ref
* Make i18n string keys consistent
* [AC-1461] Secrets Manager seat autoscaling cleanup (#5924)
* Remove unused return value from putOrganizationUserBulkEnableSecretsManager
* Fix service account limit validator (#5926)
* Updated Utils.daysRemaining method to calculate result using Math.floor and updated unit tests.
---------
Co-authored-by: Shane Melton <smelton@bitwarden.com>
Co-authored-by: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com>
Co-authored-by: Rui Tome <rtome@bitwarden.com>
Co-authored-by: Will Martin <contact@willmartian.com>
Co-authored-by: Álison Fernandes <vvolkgang@users.noreply.github.com>
Co-authored-by: Rui Tomé <108268980+r-tome@users.noreply.github.com>
* Rename service-factory folder
* Move cryptographic service factories
* Move crypto models
* Move crypto services
* Move domain base class
* Platform code owners
* Move desktop log services
* Move log files
* Establish component library ownership
* Move background listeners
* Move background background
* Move localization to Platform
* Move browser alarms to Platform
* Move browser state to Platform
* Move CLI state to Platform
* Move Desktop native concerns to Platform
* Move flag and misc to Platform
* Lint fixes
* Move electron state to platform
* Move web state to Platform
* Move lib state to Platform
* Fix broken tests
* Rename interface to idiomatic TS
* `npm run prettier` 🤖
* Resolve review feedback
* Set platform as owners of web core and shared
* Expand moved services
* Fix test types
---------
Co-authored-by: Hinton <hinton@users.noreply.github.com>
* [EC-1070] Introduce flag for enforcing master password policy on login
* [EC-1070] Update master password policy form
Add the ability to toggle enforceOnLogin flag in web
* [EC-1070] Add API method to retrieve all policies for the current user
* [EC-1070] Refactor forcePasswordReset in state service to support more options
- Use an options class to provide a reason and optional organization id
- Use the OnDiskMemory storage location so the option persists between the same auth session
* [AC-1070] Retrieve single master password policy from identity token response
Additionally, store the policy in the login strategy for future use
* [EC-1070] Introduce master password evaluation in the password login strategy
- If a master password policy is returned from the identity result, evaluate the password.
- If the password does not meet the requirements, save the forcePasswordReset options
- Add support for 2FA by storing the results of the password evaluation on the login strategy instance
- Add unit tests to password login strategy
* [AC-1070] Modify admin password reset component to support update master password on login
- Modify the warning message to depend on the reason
- Use the forcePasswordResetOptions in the update temp password component
* [EC-1070] Require current master password when updating weak mp on login
- Inject user verification service to verify the user
- Conditionally show the current master password field only when updating a weak mp. Admin reset does not require the current master password.
* [EC-1070] Implement password policy check during vault unlock
Checking the master password during unlock is the only applicable place to enforce the master password policy check for SSO users.
* [EC-1070] CLI - Add ability to load MP policies on login
Inject policyApi and organization services into the login command
* [EC-1070] CLI - Refactor update temp password logic to support updating weak passwords
- Introduce new shared method for collecting a valid and confirmed master password from the CLI and generating a new encryption key
- Add separate methods for updating temp passwords and weak passwords.
- Utilize those methods during login flow if not using an API key
* [EC-1070] Add route guard to force password reset when required
* [AC-1070] Use master password policy from verify password response in lock component
* [EC-1070] Update labels in update password component
* [AC-1070] Fix policy service tests
* [AC-1070] CLI - Force sync before any password reset flow
Move up the call to sync the vault before attempting to collect a new master password. Ensures the master password policies are available.
* [AC-1070] Remove unused getAllPolicies method from policy api service
* [AC-1070] Fix missing enforceOnLogin copy in policy service
* [AC-1070] Include current master password on desktop/browser update password page templates
* [AC-1070] Check for forced password reset on account switch in Desktop
* [AC-1070] Rename WeakMasterPasswordOnLogin to WeakMasterPassword
* [AC-1070] Update AuthServiceInitOptions
* [AC-1070] Add None force reset password reason
* [AC-1070] Remove redundant ForcePasswordResetOptions class and replace with ForcePasswordResetReason enum
* [AC-1070] Rename ForceResetPasswordReason file
* [AC-1070] Simplify conditional
* [AC-1070] Refactor logic that saves password reset flag
* [AC-1070] Remove redundant constructors
* [AC-1070] Remove unnecessary state service call
* [AC-1070] Update master password policy component
- Use typed reactive form
- Use CL form components
- Remove bootstrap
- Update error component to support min/max
- Use Utils.minimumPasswordLength value for min value form validation
* [AC-1070] Cleanup leftover html comment
* [AC-1070] Remove overridden default values from MasterPasswordPolicyResponse
* [AC-1070] Hide current master password input in browser for admin password reset
* [AC-1070] Remove clientside user verification
* [AC-1070] Update temp password web component to use CL
- Use CL for form inputs in the Web component template
- Remove most of the bootstrap classes in the Web component template
- Use userVerificationService to build the password request
- Remove redundant current master password null check
* [AC-1070] Replace repeated user inputs email parsing helpers
- Update passwordStrength() method to accept an optional email argument that will be parsed into separate user inputs for use with zxcvbn
- Remove all other repeated getUserInput helper methods that parsed user emails and use the new passwordStrength signature
* [AC-1070] Fix broken login command after forcePasswordReset enum refactor
* [AC-1070] Reduce side effects in base login strategy
- Remove masterPasswordPolicy property from base login.strategy.ts
- Include an IdentityResponse in base startLogin() in addition to AuthResult
- Use the new IdentityResponse to parse the master password policy info only in the PasswordLoginStrategy
* [AC-1070] Cleanup password login strategy tests
* [AC-1070] Remove unused field
* [AC-1070] Strongly type postAccountVerifyPassword API service method
- Remove redundant verify master password response
- Use MasterPasswordPolicyResponse instead
* [AC-1070] Use ForceResetPassword.None during account switch check
* [AC-1070] Fix check for forcePasswordReset reason after addition of None
* [AC-1070] Redirect a user home if on the update temp password page without a reason
* [AC-1070] Use bit-select and bit-option
* [AC-1070] Reduce explicit form control definitions for readability
* [AC-1070] Import SelectModule in Shared web module
* [AC-1070] Add check for missing 'at' symbol
* [AC-1070] Remove redundant unpacking and null coalescing
* [AC-1070] Update passwordStrength signature and add jsdocs
* [AC-1070] Remove variable abbreviation
* [AC-1070] Restore Id attributes on form inputs
* [AC-1070] Clarify input value min/max error messages
* [AC-1070] Add input min/max value example to storybook
* [AC-1070] Add missing spinner to update temp password form
* [AC-1070] Add missing ids to form elements
* [AC-1070] Remove duplicate force sync and update comment
* [AC-1070] Switch backticks to quotation marks
---------
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* [AC-431] Add new organization invite process (#4841)
* [AC-431] Added properties 'key' and 'keys' to OrganizationUserAcceptRequest
* [AC-431] On organization accept added check for 'initOrganization' flag and send encrypt keys if true
* [AC-431] Reverted changes on AcceptOrganizationComponent and OrganizationUserAcceptRequest
* [AC-431] Created OrganizationUserAcceptInitRequest
* [AC-431] Added method postOrganizationUserAcceptInit to OrganizationUserService
* [AC-431] Created AcceptInitOrganizationComponent and added routing config. Added 'inviteInitAcceptedDesc' to messages
* [AC-431] Remove blank line
* [AC-431] Remove requirement for logging in again
* [AC-431] Removed accept-init-organization.component.html
* Update libs/common/src/abstractions/organization-user/organization-user.service.ts
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* [AC-431] Sending collection name when initializing an org
* [AC-431] Deleted component accept-init-organization and incorporated logic into accept-organization
* Update libs/common/src/abstractions/organization-user/organization-user.service.ts
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* [AC-431] Returning promise chains
* [AC-431] Moved ReAuth check to org accept only
* [AC-431] Fixed import issues
---------
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* [AC-434] Hide billing screen for reseller clients (#4955)
* [AC-434] Retrieving ProviderType for each Org
* [AC-434] Hide subscription details if user cannot manage billing
* [AC-434] Renamed providerType to provider-type
* [AC-434] Reverted change that showed Billing History and Payment Methods tabs
* [AC-434] Hiding Secrets Manager enroll
* [AC-434] Renamed Billing access variables to be more readable
* Apply suggestions from code review
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* [AC-434] Reduce duplication in permission code
* [AC-434] npm prettier
* [AC-434] Changed selfhost subscription permission
* [AC-434] Added canEditSubscription check for change plan buttons
* [AC-434] Removed message displaying provider name in subscription
* [AC-434] canEditSubscription logic depends on canViewSubscription
* [AC-434] Hiding next charge value for users without billing edit permission
* [AC-434] Changed canViewSubscription and canEditSubscription to be clearer
* [AC-434] Altered BillingSubscriptionItemResponse.amount and BillingSubscriptionUpcomingInvoiceResponse.amount to nullable
* [AC-434] Reverted change on BillingSubscriptionItemResponse.amount
---------
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* Updated IsPaidOrgGuard reference from org.CanManageBilling to canEditSubscription
---------
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* [EC-974] feat: scaffold new vault-items component
* [EC-974] feat: add basic mocked data to story
* [EC-974] feat: add initial table version
* [EC-974] chore: split rows into separate components
* [EC-974] chore: rename item row to cipher row
* [EC-974] feat: create common vault item interface
* [EC-974] feat: use cdk virtual scrolling
* [EC-974] fix: tweak `itemSize`
* [EC-974] chore: move vault-items component to app/vault folder
* [EC-974] feat: initial support for extra column
* [EC-974] feat: start adding org badge
Having issues with modules import
* [EC-974] feat: add working owner column on collections row
* [EC-974] feat: add owner to ciphers
* [EC-974] fix: org name badge bugs when reused
* [EC-974] feat: fix and translate columns
* [EC-974] feat: allow collections to be non-editable
* [EC-974] feat: use data source
* [EC-974] fix: remove profile name from vault items
* [EC-974] feat: add events
* [EC-974] feat: add support for copy event
* [EC-974] feat: add support for collections column
* [EC-974] feat: add support for group badges
* [EC-974] chore: rename for consistency
* [EC-974] feat: change story to use template
* [EC-974] feat: add support for launching
* [EC-974] feat: add support for attachements
* [EC-974] feat: add stories for all use-cases
* [EC-974] feat: add support for cloning
* [EC-974] feat: add support for moving to organization
* [EC-974] feat: add support for editing cipher collections
* [EC-974] feat: add support for event logs
* [EC-974] feat: add support for trash/delete/restore
* [EC-974] feat: add support for editing collections
* [EC-974] feat: add support for access and delete collections
* [EC-974] feat: don't show menu if it's empty
* [EC-974] feat: initial buggy implementation of selection
* [EC-974] feat: implement bulk move
* [EC-974] feat: add support for bulk moving to org
* [EC-974] feat: add support for bulk restore
* [EC-974] feat: add support for bulk delete
* [EC-974] feat: add ability to disable the table
* [EC-974] feat: create new filter function based on routed model
* [EC-974] wip: start replacing vault items component
* [EC-974] feat: add support for fetching ciphers
* [EC-974] feat: hide trash by default
* [EC-974] feat: add support for the rest of the data
* [EC-974] feat: implement organization filtering using org badge
* [EC-974] feat: fix navigation to "my vault"
* [EC-974] feat: don't show bulk move options when filtering on org items
* [EC-974] feat: prepare for disabling table
* [EC-974] fix: add missing router link to collections
* [EC-974] feat: connect all outputs
* [EC-974] fix: list not properly refreshing after delete
* [EC-974] feat: limit selection to top 500 items
* [EC-974] feat: implement refresh tracker
* [EC-974] feat: use refresh tracker to disable vault items
* [EC-974] feat: add empty list message
* [AC-974] feat: add initial load with spinner and fix empty -> show list bug
* [EC-974] feat: replace action promise with simple loading boolean
* [EC-974] feat: refactor individual vault header
* [EC-974] feat: cache and make observables long lived
* [EC-974] feat: implement searching
* [EC-974] feat: add support for showing collections
* [EC-974] feat: add ciphers to org vault list
* [EC-974] feat: show group column
* [EC-974] feat: tweak settings for org vault
* [EC-974] feat: implement search using query params
* [EC-974] feat: add support for events that are common with individual vault
* [EC-974] feat: add support for all events
* [EC-974] feat: add support for empty list message and no permission message
* [EC-974] feat: always show table
* [EC-974] feat: fix layout issues due to incorrect row height
* [EC-974] feat: disable list if empty
* [EC-974] feat: improve sync handling
* [EC-974] feat: improve initial loading sequence
* [EC-974] feat: improve initial load sequence in org vault
* [EC-974] refactor: simplify and optimize data fetching
* [EC-974] feat: use observables from org service
* [EC-974] feat: refactor org vault header
* [EC-974] fix: data not refreshing properly
* [EC-974] fix: avoid collection double fetching
* [EC-974] chore: clean up refresh tracker
* [EC-974] chore: clean up old vault-items components
* [EC-974] chore: clean up old code in vault component
* [EC-974] fix: reduce rows in story
The story ends up too big for chromatic.
* [EC-974] docs: tweak and typo fixes of asyncToObservable docs comment
* [EC-974] fix: `attachements` typo
* [EC-974] chore: remove review question comment
* [EC-974] chore: remove unused `securityCode` if statement
* [EC-974] fix: use `takeUntill` for legacy dialogs
* [EC-974] fix: use CollectionDialogTabType instead of custom strings
* [EC-974] fix: copy implementation
* [EC-974] fix: use `useTotp` to check for premium features
* [EC-974] fix: use `tw-sr-only`
* [EC-974] chore: remove unecessary eslint disable
* [EC-974] fix: clarify vault item event naming
* [EC-974] fix: remove `new` from `app-new-vault-items`
* [EC-974] fix: collection row not disabled during loading
* [EC-974] chore: simplify router links without path changes
* [EC-974] feat: invert filter function to get rid of `cipherPassesFilter`
* [EC-974] fix: move `NestingDelimiter` to collection view
Nesting is currently only a presentational construct, and the concept does not exist in our domain.
* [EC-974] fix: org vault header not updating when switching org
* [EC-974] fix: table sizing jumping around
* [EC-974] fix: list not refreshing after restoring item
* [EC-974] fix: re-add missing unassigned collection
* [EC-974] fix don't show new item button in unassigned collection
* [EC-974] fix: navigations always leading to individual vault
* [EC-974] fix: remove checkbox when collections are not editable
* [EC-974] fix: null reference blocking collections from refreshing after delete
* [EC-974] fix: don't show checbox for collections that user does not have permissions to delete
* [EC-974] fix: navigate away from deleted folder
* [EC-974] chore: clean up un-used output
* [EC-974] fix: org badge changing color randomly
* [EC-974] fix: lint issues after merge
* [EC-974] fix: lower amount of ciphers in story
chromatic doesn't like large snapshots
* [EC-974] fix: "all collections" not taking `organizationId` filter into account
* [EC-974] fix: make sure unassigned appears in table too
* [EC-974] feat: add unassigned to storybook
* [EC-974] fix: forced row height not being applied properly
* [EC-974] fix: hopefully fix table jumping once and for all
* [EC-974] fix: attachemnts getting hidden
* [EC-974] feat: extract collection editable logic to parent component
* [EC-974] feat: separately track editable items
* [EC-974] feat: optimize permission checks
* [EC-974] fix: bulk menu hidden on chrome
:lolcry:
* [EC-974] fix: don't show groups column if org doesnt use groups
* [EC-974] feat: make entire row clickable
* [EC-974] fix: typo resulting in non-editable collections
* PS-2390 - Passing folder and collection id on import
Reading groupingid from lastpass csv as collection or folder id
* PS-2390 - Added toDomain and toModel on FolderWithIdExport model and created CollectionWithIdExport model
* PS-2390 - renamed groupingid into bwcollectionid on lastpass importer
* PS-2390 - Updated collection/folder-with-id export to reuse parent toDomain and toView
* PS-2390 Undo the lastpass importer groupingId rename
* PS-2390 Undo lastpass importer changes
* PS-2390 - Removed externalId set. Cleaning collection-with-id-request to user parent properties
* Lint prettier