-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow for bulk updating AuthRequest
database objects
#4053
Allow for bulk updating AuthRequest
database objects
#4053
Commits on May 6, 2024
-
Declare a new repository interface method
To facilitate a new bulk device login request approval workflow in the admin console we need to update `IAuthRequestRepisitory` (owned by Auth team) to include an`UpdateManyAsync()` method. It should accept a list of `AuthRequest` table objects, and implementations will do a very simple 1:1 update of the passed in data. This commit adds an `UpdateManyAsync()` method to the `AuthRequestRepository` interface.
Configuration menu - View commit details
-
Copy full SHA for 6b6ec51 - Browse repository at this point
Copy the full SHA 6b6ec51View commit details -
Stub out method implementations to enable unit testing
This commit stubs out implementations of `IAuthRequestRepository.UpdateManyAsync()` so the method signature can be called in unit tests. At this stage the methods are not implemented.
Configuration menu - View commit details
-
Copy full SHA for 60667eb - Browse repository at this point
Copy the full SHA 60667ebView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9f9509e - Browse repository at this point
Copy the full SHA 9f9509eView commit details -
Establish a user defined SQL type for Auth Requests
To facilitate a bulk update operation for auth requests a new user defined type will need to be written that can be used as a table input to the stored procedure. This will follow a similar pattern to how the `OragnizationSponsorshipType` works and is used by the stored procedure `OrganizationSponsorship_UpdateMany`.
Configuration menu - View commit details
-
Copy full SHA for e8ff955 - Browse repository at this point
Copy the full SHA e8ff955View commit details -
Establish a new stored procedure
To facilitate the bulk updating of auth request table objects this commit adds a new stored procedure to update a collection of entities on `AuthRequest` table by their primary key. It updates all properties, for convention, but the endpoint created later will only change the `Approved`, `ResponseDate`, `Key`, `MasterPasswordHash`, and `AuthenticationDate` properties.
Configuration menu - View commit details
-
Copy full SHA for 0237032 - Browse repository at this point
Copy the full SHA 0237032View commit details -
Apply a SQL server migration script
This commit simply applies a migration script containing the new user defined type and stored procedure comitted previously.
Configuration menu - View commit details
-
Copy full SHA for 25c760d - Browse repository at this point
Copy the full SHA 25c760dView commit details -
Enable converting an
IEnumerable<AuthRequest>
to aDataTable
The current pattern in place for bulk update stored procedures is to pass a `DataTable` through Dapper as an input for the update stored procedure being run. In order to facilitate the new bulk update procedure for the`AuthRequest` type we need a function added that can convert an `IEnumerable<AuthRequest>` to a `DataTable`. This is commit follows the convention of having a static class with a conversion method in a `Helpers` folder: `AuthRequestHelpers.ToDataTable()`.
Configuration menu - View commit details
-
Copy full SHA for 038f746 - Browse repository at this point
Copy the full SHA 038f746View commit details -
Implement
Dapper/../AuthRequestRepository.UpdateMany()
This commit implements `AuthRequestRepository.UpdateMany()` for the Dapper implementation of `AuthRequestRepository`. It connects the stored procedure, `DataTable` converter, and Dapper-focused unit test commits written previously into one exposed method that can be referenced by service callers.
Configuration menu - View commit details
-
Copy full SHA for 69aad92 - Browse repository at this point
Copy the full SHA 69aad92View commit details -
Implement
EntityFramework/../AuthRequestRepository.UpdateMany()
This commit implements the new `IAuthRequestRepository.UpdateManyAsync()`method in the Entity Framework skew of the repository layer. It checks to make sure the passed in list has auth requests, converts them all to an Entity Framework entity, and then uses `UpdateRange` to apply the whole thing over in the database context.
Configuration menu - View commit details
-
Copy full SHA for 9d5b27e - Browse repository at this point
Copy the full SHA 9d5b27eView commit details
Commits on May 13, 2024
-
Merge branch 'main' into ac/addison/ac-2301/service-bulk-device-appro…
…val-endpoint-api
Configuration menu - View commit details
-
Copy full SHA for 39c2643 - Browse repository at this point
Copy the full SHA 39c2643View commit details -
Configuration menu - View commit details
-
Copy full SHA for a8e53d8 - Browse repository at this point
Copy the full SHA a8e53d8View commit details -
Configuration menu - View commit details
-
Copy full SHA for cea0589 - Browse repository at this point
Copy the full SHA cea0589View commit details
Commits on May 20, 2024
-
Merge branch 'main' into ac/addison/ac-2301/service-bulk-device-appro…
…val-endpoint-api
Configuration menu - View commit details
-
Copy full SHA for 407d25a - Browse repository at this point
Copy the full SHA 407d25aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 632e3fa - Browse repository at this point
Copy the full SHA 632e3faView commit details -
Configuration menu - View commit details
-
Copy full SHA for 582409d - Browse repository at this point
Copy the full SHA 582409dView commit details -
Configuration menu - View commit details
-
Copy full SHA for d816ce1 - Browse repository at this point
Copy the full SHA d816ce1View commit details -
Configuration menu - View commit details
-
Copy full SHA for c6660d8 - Browse repository at this point
Copy the full SHA c6660d8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7f444b7 - Browse repository at this point
Copy the full SHA 7f444b7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5034ace - Browse repository at this point
Copy the full SHA 5034aceView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6b9d2e3 - Browse repository at this point
Copy the full SHA 6b9d2e3View commit details