* [PM-17562] Slack Event Investigation
* Refactored Slack and Webhook integrations to pull configurations dynamically from a new Repository
* Added new TemplateProcessor and added/updated unit tests
* SlackService improvements, testing, integration configurations
* Refactor SlackService to use a dedicated model to parse responses
* Refactored SlackOAuthController to use SlackService as an injected dependency; added tests for SlackService
* Remove unnecessary methods from the IOrganizationIntegrationConfigurationRepository
* Moved Slack OAuth to take into account the Organization it's being stored for. Added methods to store the top level integration for Slack
* Organization integrations and configuration database schemas
* Format EF files
* Initial buildout of basic repositories
* [PM-17562] Add Dapper Repositories For Organization Integrations and Configurations
* Update Slack and Webhook handlers to use new Repositories
* Update SlackOAuth tests to new signatures
* Added EF Repositories
* Update handlers to use latest repositories
* [PM-17562] Add Dapper and EF Repositories For Ogranization Integrations and Configurations
* Updated with changes from PR comments
* Adjusted Handlers to new repository method names; updated tests to naming convention
* Adjust URL structure; add delete for Slack, add tests
* Added Webhook Integration Controller
* Add tests for WebhookIntegrationController
* Added Create/Delete for OrganizationIntegrationConfigurations
* Prepend ConnectionTypes into IntegrationType so we don't run into issues later
* Added Update to OrganizationIntegrationConfigurtionController
* Moved Webhook-specific integration code to being a generic controller for everything but Slack
* Removed delete from SlackController - Deletes should happen through the normal Integration controller
* Fixed SlackController, reworked OIC Controller to use ids from URL and update the returned object
* Added parse/type checking for integration and integration configuration JSONs, Cleaned up GlobalSettings to remove old values
* Cleanup and fixes for Azure Service Bus support
* Clean up naming on TemplateProcessorTests
* Address SonarQube warnings/suggestions
* Expanded test coverage; Cleaned up tests
* Respond to PR Feedback
* Rename TemplateProcessor to IntegrationTemplateProcessor
---------
Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
* Add OrganizationUpdateKeysCommand
* Add unit tests for OrganizationUpdateKeysCommand to validate permission checks and key updates
* Register OrganizationUpdateKeysCommand for dependency injection
* Refactor OrganizationsController to use IOrganizationUpdateKeysCommand for updating organization keys
* Remove outdated unit tests for UpdateOrganizationKeysAsync in OrganizationServiceTests
* Remove UpdateOrganizationKeysAsync method from IOrganizationService and OrganizationService implementations
* Add IOrganizationUpdateKeysCommand dependency mock to OrganizationsControllerTests
* Renamed ManagedUserDomainClaimedEmails to ClaimedUserDomainClaimedEmails
* Renamed method to improve clarity and consistency.
Replaced `ValidateManagedUserDomainAsync` with `ValidateClaimedUserDomainAsync`.
* Rename `GetOrganizationsManagingUserAsync` to `GetOrganizationsClaimingUserAsync`.
This renaming clarifies the function's purpose, aligning its name with the concept of "claiming" rather than "managing" user associations.
* Refactor variable naming in ValidateClaimedUserDomainAsync
* Managed to claimed
* Managed to claimed
* Managed to claimed
* Managing to Claiming
* Managing to Claiming
* Managing to Claiming
* Managing to Claiming
* Renamed DeleteManagedOrganizationUserAccountCommand to DeleteClaimedOrganizationUserAccountCommand
* Renamed IDeleteManagedOrganizationUserAccountCommand to IDeleteClaimedOrganizationUserAccountCommand
* Updated variable name
* IsManagedBy to IsClaimedBy
* Created new property. obsoleted old property and wired up for backward compatibility.
* More Managed to Claimed renames.
* Managed to Claimed
* Fixing tests... 🤦
* Got the rest of em
* missed the test 🤦
* fixed test.
* Moved RestoreUserAsync and RestoreUsersAsync to Command.
* Fixing the bug.
* Added test for bulk method.
* Fixing sonar cube warning.
* SonarQube warning fix.
* Excluding org users we already have.
* Fixed misspelling. Added integration test for method.
* test had the misspelling as well 🤦
* Split out interface. Added admin and confirmed constraints.
* fixed queries and added xml comments and tests.
* Add ConfirmOrganizationUserCommand and IConfirmOrganizationUserCommand interface for managing organization user confirmations
* Add unit tests for ConfirmOrganizationUserCommand to validate user confirmation scenarios
* Register ConfirmOrganizationUserCommand for dependency injection
* Refactor OrganizationUsersController to utilize IConfirmOrganizationUserCommand for user confirmation processes
* Remove ConfirmUserAsync and ConfirmUsersAsync methods from IOrganizationService and OrganizationService
* Rename test methods in ConfirmOrganizationUserCommandTests for clarity and consistency
* Update test method name in ConfirmOrganizationUserCommandTests for improved clarity
* feat(pm-15015) :
* Add `CountryName` column to AuthRequest Table in Database, and refreshing AuthRequestView
* Modify database stored procedures and Entity Framework migrations for AuthRequest Repositories
* Add property to `ICurrentContext` and response models.
* Remove gRPC and convert PricingClient to HttpClient wrapper
* Add PlanType.GetProductTier extension
Many instances of StaticStore use are just to get the ProductTierType of a PlanType, but this can be derived from the PlanType itself without having to fetch the entire plan.
* Remove invocations of the StaticStore in non-Test code
* Deprecate StaticStore entry points
* Run dotnet format
* Matt's feedback
* Run dotnet format
* Rui's feedback
* Run dotnet format
* Replacements since approval
* Run dotnet format
* Implement endpoints to add existing organization to provider
* Run dotnet format
* Support MOE
* Run dotnet format
* Move ProviderClientsController under AC ownership
* Move ProviderClientsControllerTests under AC ownership
* Jared's feedback
* Create organization deletion command with logic extracted from OrganizationService
* Add unit tests for OrganizationDeleteCommand
* Register OrganizationDeleteCommand for dependency injection
* Refactor organization deletion logic to use IOrganizationDeleteCommand and remove legacy IOrganizationService.DeleteAsync method
* Add organization deletion initiation command and refactor service usage
* Enhance organization deletion commands with detailed XML documentation
* Refactor organization command registration to include sign-up and deletion methods
GetByToken and GetMasterPasswordPolicy endpoints provide policy information, so if the organization is not using policies, then we avoid the rest of the logic.
* Implement UserLeaveAsync in IRemoveOrganizationUserCommand and refactor OrganizationsController to use it
* Edit summary message for IRemoveOrganizationUserCommand.UserLeaveAsync
* Refactor RemoveOrganizationUserCommand.RemoveUsersAsync to log in bulk
---------
Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
* Enhance RemoveOrganizationUserCommand to block removing managed users when account deprovisioning is enabled
* Refactor RemoveUsersAsync method to return just the OrgUserId and update related logic.
* Refactor RemoveOrganizationUserCommand to improve variable naming and remove unused logging method
* Add support for event system user in RemoveUsersAsync method. Refactor unit tests.
* Add xmldoc to IRemoveOrganizationUserCommand methods
* Refactor RemoveOrganizationUserCommand to use TimeProvider for event date retrieval and update unit tests accordingly
* Refactor RemoveOrganizationUserCommand to use constants for error messages
* Refactor unit tests to separate feature flag tests
* refactor: Update parameter names for clarity in RemoveOrganizationUserCommand
* refactor: Rename validation and repository methods for user removal clarity
1. Remove _organizationService.ValidateOrganizationUserUpdatePermissions since it is not needed for updating group associations.
2. Remove loggedInUserId since it's no longer needed.
3. Update/remove related tests.
* Remove flag from CreateProviderCommand
* Remove flag from OrganizationsController
* Consolidate provider extensions
* Remove flag from ProvidersController
* Remove flag from CreateMsp.cshtml
* Remove flag from Provider Edit.cshtml
Also ensured the editable Gateway fields show for Multi-organization enterprises
* Remove flag from OrganizationsController
* Remove flag from billing-owned provider controllers
* Remove flag from OrganizationService
* Remove flag from RemoveOrganizationFromProviderCommand
* Remove flag from ProviderService
* Remove flag
* Run dotnet format
* Fix failing tests
* Adding CanToggleState to PoliciesControllers (api/public) endpoints. Added mappings wrapped in feature flag.
* Updated logic for determining CanToggle. Removed setting of toggle from List endpoint. Added new details model for single policy response. Validator now returns after first error.
* Return Policy object instead of NotFoundException
* Add unit tests, change orgId type to Guid
* Fix test cases, throw exception when manage not allowed
* Refactor OrganizationUsersController.Get to include organization management status of organization users in details endpoint
* Refactor OrganizationUsersController.Get to include organization management status of an individual user in details endpoint
* Remove redundant .ToDictionary()
* Simpify the property xmldoc
* Name tuple variables in OrganizationUsersController.Get
* Name returned tuple objects in GetDetailsByIdWithCollectionsAsync method in OrganizationUserRepository
* Refactor MembersController.Get to destructure tuple returned by GetDetailsByIdWithCollectionsAsync
* Add test for OrganizationUsersController.Get to assert ManagedByOrganization is set accordingly