Commit graph

3050 commits

Author SHA1 Message Date
Pat Hartl
fe0250c12a Register DbContextFactory and IdentityContextFactory 2024-10-16 18:41:39 -05:00
Pat Hartl
ff4702d29f Use short lived DatabaseContext for RoleService 2024-10-16 18:37:16 -05:00
Pat Hartl
c075d8f398 Use short lived database context for UserService methods 2024-10-16 18:32:48 -05:00
Pat Hartl
524f4c9573 Back to managers 2024-10-16 16:29:55 -05:00
Pat Hartl
991771a7f3 Use string constant for administrator role name 2024-10-16 02:06:02 -05:00
Pat Hartl
91829f601d Enable navigation properties for user roles, use service in place of managers 2024-10-16 01:54:51 -05:00
Pat Hartl
14df6bc95c Use custom models for identities 2024-10-15 23:48:16 -05:00
Pat Hartl
57d93e33e6 Remove identity context 2024-10-15 20:50:54 -05:00
Pat Hartl
cf9d9f6253 Rename identity tables 2024-10-15 20:48:06 -05:00
Pat Hartl
2c937d382f Fix issue exporting servers
Some checks failed
LANCommander Release / prep (push) Has been cancelled
LANCommander Release / build_server_linux-arm64 (push) Has been cancelled
LANCommander Release / build_server_linux-x64 (push) Has been cancelled
LANCommander Release / build_server_osx-arm64 (push) Has been cancelled
LANCommander Release / build_server_osx-x64 (push) Has been cancelled
LANCommander Release / build_server_win-arm64 (push) Has been cancelled
LANCommander Release / build_server_win-x64 (push) Has been cancelled
LANCommander Release / build_launcher_linux-arm64 (push) Has been cancelled
LANCommander Release / build_launcher_linux-x64 (push) Has been cancelled
LANCommander Release / build_launcher_osx-arm64 (push) Has been cancelled
LANCommander Release / build_launcher_osx-x64 (push) Has been cancelled
LANCommander Release / build_launcher_win-arm64 (push) Has been cancelled
LANCommander Release / build_launcher_win-x64 (push) Has been cancelled
LANCommander Release / build_release (push) Has been cancelled
2024-10-15 02:19:03 -05:00
Pat Hartl
a1c760b72e Fix error importing servers with console defined 2024-10-15 02:16:50 -05:00
Pat Hartl
41880c9a66 Change function to call for sending import message 2024-10-15 02:01:30 -05:00
Pat Hartl
6c2eb1cd1c Fix potential issue when downloading saves 2024-10-15 02:00:54 -05:00
Pat Hartl
2e5ae435bd Move Identity user store to separate database context 2024-10-14 01:29:45 -05:00
Pat Hartl
9762c803f0 Restore lazy loading 2024-10-14 01:00:12 -05:00
Pat Hartl
c9171079e2 Restore getting user via HttpContext 2024-10-14 00:59:54 -05:00
Pat Hartl
d33ecc30e0 Remove usage of DatabaseContext outside Repository 2024-10-14 00:59:32 -05:00
Pat Hartl
2805f34449 WIP fix for MySQL connection concurrency issues
This is a large commit. There are a number of things that this commit does to try to fix various issues that were occurring when the database provider was set to MySQL:
- The DAL `Repository` has been completely refactored to follow best practices. The repository is now being injected into services instead of the database context itself. This allows the DI to handle the repository's lifetime instead of creating a new repository for every transaction and sharing the context across repositories. As part of these changes, there is no more allowed usage of `IQueryable` and all service/repository methods must actually execute database queries before their return. This is to ensure that the context does not stay open longer than it needs to. Abusing `IQueryable`s by tossing them into Blazor components seems to be a big no-no.
- Some deletion behaviors on relationships have been tweaked as MySQL wasn't able to apply migrations with behaviors that were contradictory.
- A `ConnectionInterceptor` was added to try to keep track of `DatabaseContext` lifetimes. This is really only for debugging and should be put into `#if DEBUG` regions. This helped identify some potential issues where some contexts were basically never closing, causing the MySQL connector to not function.
- Docs for generating migrations have been updated to reflect the addition of being able to specify the database provider and connection string when adding a migration, avoiding the need to edit `Settings.yml`
- The application can now be put into a pause state on startup by adding the `--debugger` argument when used from the command line. When a debugger is attached, it resumes execution.
- The application can now log to Seq when using debug build
- Service lifetime on `DatabaseContext` has switched to transient. This may be reverted in the future.
- Lazy loading has been disabled for debugging purposes. It didn't directly help the concurrency issues, but it needs to be tested individually to be re-enabled.
- All usage of `UserManager`, `RoleManager`, and `SignInManager` have been removed from all controllers, pages, and Blazor components. Functionality has been moved to `UserService` and `RoleService`. This might have done the most amount of help, but could probably be improved upon in the future by not relying on them and instead having our own implementation.
- Application startup migrations and server autostarts have been disabled temporarily. There might be an issue of `DatabaseContext` lifetimes that spawn from this.
2024-10-13 20:42:45 -05:00
Pat Hartl
e236c2b25b Refactored first time setup
Fixes #128
2024-10-12 18:36:00 -05:00
Pat Hartl
9d023dacd0 Solution GUID updates 2024-10-12 18:34:14 -05:00
Pat Hartl
93f898ac0a Merge branch 'v1.1.0' of https://github.com/LANCommander/LANCommander into v1.1.0 2024-10-12 18:33:59 -05:00
Pat Hartl
ba18096dde Update packages 2024-10-12 18:33:57 -05:00
Pat Hartl
7ca46bd5f4 Only download profile on start if connected 2024-10-12 12:07:24 -05:00
Pat Hartl
ab884b925c Display download and install size for games
Ref #122
2024-10-12 12:04:00 -05:00
Pat Hartl
33fcc96117 Fix saving of new path 2024-10-11 01:15:01 -05:00
Pat Hartl
609a11fec2 Filter list of storage locations to archive type 2024-10-11 01:10:47 -05:00
Pat Hartl
07882e39d2 Add ability to specify multiple upload folders for archives
Implements #97
2024-10-11 01:09:12 -05:00
Pat Hartl
57d99b054d Fix install dialog only appearing when addons exist 2024-10-09 20:46:06 -05:00
Pat Hartl
08d0ae7c3b Add count of selected, adjust spacing, add description 2024-10-09 20:45:42 -05:00
Pat Hartl
61c25ac005 Avoid null reference exception at end of script exec 2024-10-09 20:22:41 -05:00
Pat Hartl
d3f8d77481 Avoid null reference when installing addons 2024-10-09 20:22:27 -05:00
Pat Hartl
b1e193d988 Add support for selective install of mods/expansions
Implements #126
2024-10-09 19:23:42 -05:00
Pat Hartl
a43f940251 Merge branch 'main' into v1.1.0 2024-10-09 19:15:49 -05:00
Pat Hartl
6d6526a5f3 Import mods and expansions, but filter them out
Some checks failed
LANCommander Release / prep (push) Has been cancelled
LANCommander Release / build_launcher_win-arm64 (push) Has been cancelled
LANCommander Release / build_launcher_win-x64 (push) Has been cancelled
LANCommander Release / build_release (push) Has been cancelled
LANCommander Release / build_server_linux-arm64 (push) Has been cancelled
LANCommander Release / build_server_linux-x64 (push) Has been cancelled
LANCommander Release / build_server_osx-arm64 (push) Has been cancelled
LANCommander Release / build_server_osx-x64 (push) Has been cancelled
LANCommander Release / build_server_win-arm64 (push) Has been cancelled
LANCommander Release / build_server_win-x64 (push) Has been cancelled
LANCommander Release / build_launcher_linux-arm64 (push) Has been cancelled
LANCommander Release / build_launcher_linux-x64 (push) Has been cancelled
LANCommander Release / build_launcher_osx-arm64 (push) Has been cancelled
LANCommander Release / build_launcher_osx-x64 (push) Has been cancelled
2024-10-09 17:41:42 -05:00
Pat Hartl
404819cdbe Enable Swagger in all builds
Implements #127
2024-10-07 20:04:48 -05:00
Pat Hartl
f4257ade10 Add migrations for MySQL and PostgreSQL 2024-10-07 19:54:22 -05:00
Pat Hartl
e083d86d8b Add ability to switch database providers to MySQL or PostgreSQL
Ref #108
2024-10-07 18:52:52 -05:00
Pat Hartl
a40de21fc7 Rename settings models 2024-10-07 18:38:27 -05:00
Pat Hartl
91ee1d47a9 Move data and service layers to separate projects, update packages 2024-10-07 18:04:26 -05:00
Pat Hartl
b281919ab7 Import media if missing, refactor application login
Media is now imported if its given an ID that doesn't exist in the database. This should almost never happen, but it's there if needed.

The login process for the launcher has been refactored to do some initialization steps on application start. This should include pulling down the profile avatar and validating connection on start.

Fixes #124
2024-10-06 17:11:35 -05:00
Pat Hartl
a7188d2f4b Properly grab player alias when running game
Fixes #123
2024-10-05 17:09:17 -05:00
Pat Hartl
781b77f930 Move SDK services to separate namespace 2024-10-04 23:39:07 -05:00
Pat Hartl
2ad581808e Update extra file deletions
Some checks failed
LANCommander Release / prep (push) Has been cancelled
LANCommander Release / build_launcher_osx-x64 (push) Has been cancelled
LANCommander Release / build_server_osx-arm64 (push) Has been cancelled
LANCommander Release / build_server_osx-x64 (push) Has been cancelled
LANCommander Release / build_launcher_osx-arm64 (push) Has been cancelled
LANCommander Release / build_launcher_win-arm64 (push) Has been cancelled
LANCommander Release / build_launcher_win-x64 (push) Has been cancelled
LANCommander Release / build_release (push) Has been cancelled
LANCommander Release / build_server_linux-arm64 (push) Has been cancelled
LANCommander Release / build_server_linux-x64 (push) Has been cancelled
LANCommander Release / build_server_win-arm64 (push) Has been cancelled
LANCommander Release / build_server_win-x64 (push) Has been cancelled
LANCommander Release / build_launcher_linux-arm64 (push) Has been cancelled
LANCommander Release / build_launcher_linux-x64 (push) Has been cancelled
2024-10-04 00:15:16 -05:00
Pat Hartl
ac4bc7bdef Publish autoupdater as single file 2024-10-04 00:14:25 -05:00
Pat Hartl
1635547611 Debug extra files not deleting 2024-10-03 23:56:48 -05:00
Pat Hartl
b12545bd20 Autoupdater rename no longer required 2024-10-03 23:46:40 -05:00
Pat Hartl
2c804375fe Apply same refactoring to launcher 2024-10-03 23:40:55 -05:00
Pat Hartl
40442c6f8b Refactor update to extract autoupdater before running it 2024-10-03 23:36:42 -05:00
Pat Hartl
cb5f2d05c3 Fix autoupdater not running on server 2024-10-03 23:35:54 -05:00
Pat Hartl
3691337ac4 Show error when trying to delete 2024-10-03 21:11:55 -05:00