* [deps] DbOps: Update Microsoft.Data.SqlClient to 5.2.2
* Remove our Azure.Identity reference that previously patched what this PR is now doing
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
* Initial draft of moving the org user controller details method into a query
* Removing comments and addressing pr items
* Adding the org users query to core
* Adding the member access report
* Addressing some pr concerns and refactoring to be more efficient
* Some minor changes to the way properties are spelled
* Setting authorization to organization
* Adding the permissions check for reports and comments
* removing unnecessary usings
* Removing ciphers controller change that was a mistake
* There was a duplication issue in getting collections for users grabbing groups
* Adding comments to the CreateReport method
* Only get the user collections by userId
* Some finaly refactoring
* Adding the no group, no collection, and no perms local strings
* Modifying and adding query test cases
* Removing unnecessary permissions code in query
* Added mapping for id and UsesKeyConnector to MemberAccessReportModel (#4681)
* Moving test cases from controller fully into the query.
---------
Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
Co-authored-by: aj-rosado <109146700+aj-rosado@users.noreply.github.com>
* Rename IDeleteOrganizationUserCommand to IRemoveOrganizationUserCommand
* Rename IOrganizationService DeleteUser methods to RemoveUser
* Rename API endpoints for deleting organization users to "Remove"
* chore: Rename Delete method to Remove in MembersController
* Add SQL script to migrate custom users with specific permissions to User type
Remove 'editAssignedCollections' and 'deleteAssignedCollections' properties from Permissions in OrganizationUser table. Migrate custom users who only have these permissions to the User type.
* Add MySQL migration to migrate custom users with specific permissions to User type
* Add Postgres migration to migrate custom users with specific permissions to User type
* Add Sqlite migration to migrate custom users with specific permissions to User type
* Update AutoFixture usage in tests to resolve creating ILogger mock instances
* Update EF integration tests database contexts to use each respective Migrations assembly. Configure Sqlite instance
* Add RunMigration method to BaseEntityFrameworkRepository
* Add FinalFlexibleCollectionsDataMigrationsTests
* Improve data migration efficiency by using OPENJSON instead of multiple JSON_EXTRACT
* Add batching to the sql data migrations
* Update DbMigrator to run a specific script based on its name
* Update DatabaseDataAttribute to be able to test a specific migration
* Add reference to the migration projects to Infrastructure.IntegrationTest
* Add integration test to test the migration FinalFlexibleCollectionsDataMigrations
* Remove EFIntegration tests and remove RunMigration method from BaseEntityFrameworkRepository
* Add IMigrationTesterService and implementations for SQL and EF migrations
* Add FinalFlexibleCollectionsDataMigrationsTests and remove test from OrganizationUserRepositoryTests
* Update sql data migration script based on performance feedback
* Bump date on EF migration scripts
* Add xmldoc comments to IMigrationTesterService and each implementation
* Bump up the date on the EF migration scripts
* Bump up dates on EF migrations
* Added tests to assert no unwanted changes are made to the permissions json. Refactor tests.
* Revert changes made to DbMigrator and refactor SqlMigrationTesterService to not use it.
* Add method description
* Fix test to assert no changes are made to custom user
* Remove unnecessary COALESCE and SELECT CASE
* Unident lines on SQL script
* Update DatabaseDataAttribute MigrationName property to be nullable
* Fix null reference checks
* Remove unnecessary COALESCE from Postgres script
* Bump dates on migration scripts
* Bump up dates on EF migrations
* Add migration tests for handling null
* Add test for non json values
* Fix test
* Remove migrations
* Recreate EF migrations
* Update Postgres data migration script to check for valid JSON in Permissions column
---------
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
* Refactor: Rename some methods and models for consistency
This commit contains no logic changes at all. It's entirely comprised of renames of existing models and methods to bring our codebase more in line with our app's functionality and terminology.
* Add feature flag: AC-2476-deprecate-stripe-sources-api
* Standardize error responses from applicable billing controllers
During my work on CB, I found that just using the built-in TypedResults errors results in the client choking on the response because it's looking for the ErrroResponseModel. The new BaseBillingController provides Error utilities to return TypedResults wrapping that model so the client can process it.
* Add feature flagged payment method endoints to OrganizationBillingController
* Run dotnet format
* Log events from the import organization flow
* Use an interface for the `OrganizationUser` object used to log events
* Log import events as being from the public api if they are
* Add logging for created groups
* Log proper group ids
* Fix tests
* Also log update events for groups
* Remove private API `import` endpoint
* Make `eventSystemUser` non-nullable for `ImportAsync`
* Fix tests
* Delete `ImportOrganizationUsersRequestModel`
* Fix tests
* Add Pending Model Checks
* Update This File Reference
* Don't Use Title Case
* Include ConnectionString
* Remove --connection arg
* Add Fake Model Change
* Remove Fake Change
Subscription update tests were not fixing the current maxAutoscaleSeats
value. Autodata could sometimes make it the same as the new value,
so the update code wouldn't be triggered and the test would fail
* Resolve the unclear error messages
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
* Refactor to return the errormessage from userLicense
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
* Resolve the pr comments
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
* resolve the error returned message
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
* Add period at the end of error messages
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
---------
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
* Added logs when validating an existing sponsorship
* Removed early return in CancelSponsorshipAsync when validating a sponsorship
* Added missing logging messages