* Revert previous commits and implement logic to avoid null references:
• reverted previous commits and force pushed to remove inconsistent formatting
• implemented logic to avoid null reference access (with comments)
* fix typo in comment
* fix logical error and add test coverage
* extracted logic common to all code paths per review comment
* adding event filters
* allow user to see deleted secret event logs through public api
* nullable changes to event controller
* fixing tests
* fixing permissions issues with public API
* fix for bug
* Update src/Api/AdminConsole/Public/Controllers/EventsController.cs
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
* Update src/Api/AdminConsole/Public/Controllers/EventsController.cs
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
* feat(prelogin): [PM-27062] Prelogin New Response - Initial changes to support new data coming back from prelogin.
* test(prelogin): [PM-27062] Prelogin New Response - Added tests.
* Add FusionCache to service collection
* Refactored to it's own service collection extension, added full unit tests, added TryAdd style support
* Move to ExtendedCache instead of FusionCache, re-use exsting DistributedCache if present, expose backplane to DI
* Reworked builders to reuse multiplexer if present
feat(PM-21741): implement MJML welcome email templates with feature flag support
- Add MJML templates for individual, family, and organization welcome emails
- Track *.hbs artifacts from MJML build
- Implement feature flag for gradual rollout of new email templates
- Update RegisterUserCommand and HandlebarsMailService to support new templates
- Add text versions and sanitization for all welcome emails
- Fetch organization data from database for welcome emails
- Add comprehensive test coverage for registration flow
Co-authored-by: Rui Tomé <108268980+r-tome@users.noreply.github.com>
* First pass at adding Automatic User Confirmation Policy.
* Adding edge case tests. Adding side effect of updating organization feature. Removing account recovery restriction from validation.
* Added implementation for the vnext save
* Added documentation to different event types with remarks. Updated IPolicyValidator xml docs.
* Re-organize UpcomingInvoiceHandler for readability
* Milestone 3 renewal
* Map premium access data from additonal data in pricing
* Feedback
* Fix test
* The discount badge implementation
* Address the claude pr comments
* Add more unit testing
* Add more test
* used existing flag
* Add the coupon Ids
* Add more code documentation
* Add some recommendation from claude
* Fix addition comments and prs
* Add more integration test
* Fix some comment and add more test
* rename the test methods
* Add more unit test and comments
* Resolve the null issues
* Add more test
* reword the comments
* Rename Variable
* Some code refactoring
* Change the coupon ID to milestone-2c
* Fix the failing Test
* Updated sproc to update account revision date after cipher has been created in collection
* check response from update collection success
* removed the org check
* Remove EventBasedOrganizationIntegrations feature flag
* Remove unnecessary nullable enable
* Refactored service collection extensions to follow a more direct path: ASB, RabbitMQ, Azure Queue, Repository, No-op
* Use TryAdd instead of Add
* new feature flag
* first pass at changes
* safeguard against billing-pricing not being deployed yet
* handle families pre migration plan
* wrong stripe id
* tests
* unit tests
* Enhance PolicyRequestModel and SavePolicyRequest with validation for policy data and metadata.
* Add integration tests for policy updates to validate handling of invalid data types in PolicyRequestModel and SavePolicyRequest.
* Add missing using
* Update PolicyRequestModel for null safety by making Data and ValidateAndSerializePolicyData nullable
* Add integration tests for public PoliciesController to validate handling of invalid data types in policy updates.
* Add PolicyDataValidator class for validating and serializing policy data and metadata based on policy type.
* Refactor PolicyRequestModel, SavePolicyRequest, and PolicyUpdateRequestModel to utilize PolicyDataValidator for data validation and serialization, removing redundant methods and improving code clarity.
* Update PolicyRequestModel and SavePolicyRequest to initialize Data and Metadata properties with empty dictionaries.
* Refactor PolicyDataValidator to remove null checks for input data in validation methods
* Rename test methods in SavePolicyRequestTests to reflect handling of empty data and metadata, and remove null assignments in test cases for improved clarity.
* Remove Type property from PolicyRequestModel to use route parameter only
* Run dotnet format
* Enhance error handling in PolicyDataValidator to include field-specific details in BadRequestException messages.
* Enhance PoliciesControllerTests to verify error messages for BadRequest responses by checking for specific field names in the response content.
* refactor: Update PolicyRequestModel and SavePolicyRequest to use nullable dictionaries for Data and Metadata properties; enhance validation methods in PolicyDataValidator to handle null cases.
* test: Add integration tests for handling policies with null data in PoliciesController
* fix: Catch specific JsonException in PolicyDataValidator to improve error handling
* test: Add unit tests for PolicyDataValidator to validate and serialize policy data and metadata
* test: Remove PolicyType from PolicyRequestModel in PoliciesControllerTests
* test: Update PolicyDataValidatorTests to validate organization data ownership metadata
* Refactor PoliciesControllerTests to include policy type in PutVNext method calls
It is better for the command to fetch the org so that callers
do not mistakenly use it as a general purpose update method;
it is only to be used to update those properties in the request model.
This reverts commit 9df75c427b.
* fix(prevent-bad-existing-sso-user): [PM-24579] Precent Existing Non Confirmed and Accepted SSO Users - Fixed bad code and added comments.
* test(prevent-bad-existing-sso-user): [PM-24579] Precent Existing Non Confirmed and Accepted SSO Users - Added new test to make sure invited users aren't allowed through at the appropriate time.