* docs(billing): add design document for replacing SetupIntent cache
* docs(billing): add implementation plan for replacing SetupIntent cache
* feat(db): add gateway lookup stored procedures for Organization, Provider, and User
* feat(db): add gateway lookup indexes to Organization, Provider, and User table definitions
* chore(db): add SQL Server migration for gateway lookup indexes and stored procedures
* feat(repos): add gateway lookup methods to IOrganizationRepository and Dapper implementation
* feat(repos): add gateway lookup methods to IProviderRepository and Dapper implementation
* feat(repos): add gateway lookup methods to IUserRepository and Dapper implementation
* feat(repos): add EF OrganizationRepository gateway lookup methods and index configuration
* feat(repos): add EF ProviderRepository gateway lookup methods and index configuration
* feat(repos): add EF UserRepository gateway lookup methods and index configuration
* chore(db): add EF migrations for gateway lookup indexes
* refactor(billing): update SetupIntentSucceededHandler to use repository instead of cache
* refactor(billing): simplify StripeEventService by expanding customer on SetupIntent
* refactor(billing): query Stripe for SetupIntents by customer ID in GetPaymentMethodQuery
* refactor(billing): query Stripe for SetupIntents by customer ID in HasPaymentMethodQuery
* refactor(billing): update OrganizationBillingService to set customer on SetupIntent
* refactor(billing): update ProviderBillingService to set customer on SetupIntent and query by customer
* refactor(billing): update UpdatePaymentMethodCommand to set customer on SetupIntent
* refactor(billing): remove bank account support from CreatePremiumCloudHostedSubscriptionCommand
* refactor(billing): remove OrganizationBillingService.UpdatePaymentMethod dead code
* refactor(billing): remove ProviderBillingService.UpdatePaymentMethod
* refactor(billing): remove PremiumUserBillingService.UpdatePaymentMethod and UserService.ReplacePaymentMethodAsync
* refactor(billing): remove SubscriberService.UpdatePaymentSource and related dead code
* refactor(billing): update SubscriberService.GetPaymentSourceAsync to query Stripe by customer ID
Add Task 15a to plan - this was a missed requirement for updating
GetPaymentSourceAsync which still used the cache.
* refactor(billing): complete removal of PremiumUserBillingService.Finalize and UserService.SignUpPremiumAsync
* refactor(billing): remove ISetupIntentCache and SetupIntentDistributedCache
* chore: remove temporary planning documents
* chore: run dotnet format
* fix(billing): add MaxLength(50) to Provider gateway ID properties
* chore(db): add EF migrations for Provider gateway column lengths
* chore: run dotnet format
* chore: rename SQL migration for chronological order
Remove the fully-released feature flag and clean up the old code path:
- Remove flag constant from FeatureFlagKeys
- Remove [RequireFeature] gate from VNext billing controllers
- Remove old GetMetadataAsync endpoint from OrganizationBillingController
- Remove GetMetadata from IOrganizationBillingService and implementation
- Remove IsOnSecretsManagerStandalone private helper
- Remove associated tests
Fix a vulnerability in the service account events API that allowed any Premium/Enterprise User to retrieve events for any service account. This change ensures that the requesting User has access to the Organization the service account belongs to, by checking for it in the list of Orgs in request context. This matches the pattern from other endpoints in EventsController
* Adds new method for retrieving policy requirements for a collection of user IDs
* Use Single instead of First for explicit correctness
* Fix xmldoc
* Refactor return type to include user ID
* Add new feature flag for updating the join organization email templates
* Add new MJML email template for organization invite to existing users
* Add new MJML email template for organization invite to new users
* Add new MJML email template for organization invite to existing families
* Add new MJML email template for organization invite to families for new users
* Add new MJML email template for organization invite to free users
* Add OrganizationInviteBaseView model for organization invite email templates
* Add required properties for email title customization in OrganizationInviteBaseView
* Add new MJML email templates for organization invites to existing and new users, including families and free users.
* Enhance SendInvitesRequest to include optional InvitingUserId and update related methods in OrganizationService for improved user invitation tracking.
* Refactor organization invite email handling to support customized templates for existing and new users, incorporating inviting user information and enhancing the SendInvitesRequest structure.
* Refactor OrganizationInviteBaseView and SendOrganizationInvitesCommand to remove unnecessary properties, streamlining the organization invite email structure and focusing on essential information for user invitations.
* Refactor SendOrganizationInvitesCommand to improve email invitation logic by removing the OrganizationCategory enum and consolidating plan type checks. Introduce a new method for formatting expiration dates to enhance code clarity and maintainability.
* Update organization invite email templates to enhance styling
* Enhance SendOrganizationInvitesCommand to include additional plan types for organization invites, allowing support for TeamsStarter, TeamsStarter2023, and Custom plans in the invitation logic.
* Add tests for SendOrganizationInvitesCommand to validate email sending logic for various plan types, including Enterprise, Teams, Families, Free, and Custom plans, based on user existence and feature flags.
* Update organization invite email templates to improve styling and layout consistency across various user types, including adjustments to padding, font weights, and vertical alignment for a more polished appearance.
* Refactor organization invite email templates to improve styling consistency and layout across various user types, including adjustments to padding, font families, and visibility of icon rows for a more polished appearance.
* [PM-30610] Break shared components into AC versions
* Revert changes to shared MJML components
* Refactor organization invite email templates to use admin console MJML components
* Update organization invite email templates to utilize new admin console MJML components
* Enhance organization invite email templates by adding bullet point for mobile views
* Update organization invite email templates to improve layout and visibility of bullet points by changing display properties and adding inline text spans.
---------
Co-authored-by: Jimmy Vo <huynhmaivo82@gmail.com>
* Implement the correct changes
* failing test has been removed
* Add unit testing and logs
* Resolve the pr comment on missed requirements
* fix the lint error
* resolve the build lint
* Fix the failing test
* Fix the failing test
* Add the IncompleteExpired status
* resolve the lint error
* Fix the build lint error
* Implement the IncompleteExpired flow
* [PM-31483] adding guard for when email verification FF is disabled
* [PM-31483] removing need for client fallback endpoint
* [PM-31483] fixing test after main merge
* [PM-31483] changing error when email protected send should not be allowed to be viewed
* [PM-28300] Remove BlockClaimedDomainAccountCreation feature flag checks
* Fix user registration tests by adding proper email domains
* Remove redundant feature flag checks from user registration tests
* Remove BlockClaimedDomainAccountCreation constant from FeatureFlagKeys
* Extracted policy compliance checking for the organization out and added a check when attempting to enable auto user confirm via Admin Portal
* Moved injection order. Fixed error message.
* test: add tests for legacy pricing pivot in GetBitwardenSubscriptionQuery
* feat(billing): preview next charge at new price for users on legacy Premium pricing
* chore: apply dotnet format
* [PM-31684] Remove email hashing for send access
* [PM-31684] switching the order of migration files
* [PM-31684] adding more migrations
* [PM-31684] Removing anon access emails field and reusing emails field
* [PM-31684] cleanup before adding migrations back
* [PM-31684] restore original snapshots
* [PM-31684] restore original postgres snapshots
* [PM-31684] adding migrations
* [PM-31684] removing encryption attributes from emails request model
* [PM-31684] adding missing stored proc alters
* [PM-31684] Improved formatting for stored proc defs
* [PM-31684] adding necessary comment back
* [PM-31684] adding case-insensitive check on the server for send auth
* [PM-31361] Enhance domain claimed email notifications
* Updated the email template to include the claimed domain name and user email.
* Modified the `ClaimedUserDomainClaimedEmails` model to include the domain name.
* Adjusted the `SendClaimedDomainUserEmailAsync` method to pass the domain name to the email message.
* Added a new test for rendering the domain claimed email to ensure proper content delivery.
* Update email templates for domain claimed notifications
* Adjusted styles and formatting in the DomainClaimedByOrganization email template for improved readability.
* Modified the TitleContactUs layout to ensure proper rendering of titles.
* Updated the HandlebarsMailService to include HTML line breaks in the email title for better presentation.
* Update TitleContactUs email template to center-align title text for improved presentation
* Refine TitleContactUs email template by removing unnecessary text-align property for improved consistency in styling
* Fix PR comments
* Update test/Core.Test/Platform/Mail/DomainClaimedEmailRenderTest.cs
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
* Update test/Core.Test/Platform/Mail/DomainClaimedEmailRenderTest.cs
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
* Update test/Core.Test/Platform/Mail/DomainClaimedEmailRenderTest.cs
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
* Remove unnecessary comments
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>