[PR #192] chore: Core misc improvements — BuildInfo.IsInContainer, SyncRolesAsync, EditDialog cleanup #185

Closed
opened 2026-02-26 17:37:39 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/Corsinvest/cv4pve-admin/pull/192

State: closed
Merged: Yes


Summary

  • Add BuildInfo.IsInContainer property (reads DOTNET_RUNNING_IN_CONTAINER) and use it in HelpMenu instead of ApplicationHelper.IsInContainer
  • Add UserManager.SyncRolesAsync extension — bidirectional role sync (removes obsolete roles, adds new ones atomically)
  • Simplify EfCoreExtensions to use scope.GetRequiredService() shorthand
  • Simplify ServiceScopeExtensions.GetDbContextAsync() to expression body
  • Simplify EditDialog null-checks with null-conditional operators, remove redundant if blocks
  • Inject CookieThemeService in EmptyLayout
  • Minor cleanup in ApplicationHelper, PveSearchProvider, ResourceUsageGaugeStacked

Test plan

  • Verify deployment label in Help menu shows "Docker" when running in container
  • Verify SyncRolesAsync adds and removes roles correctly
  • Verify EditDialog still validates and submits correctly
**Original Pull Request:** https://github.com/Corsinvest/cv4pve-admin/pull/192 **State:** closed **Merged:** Yes --- ## Summary - Add `BuildInfo.IsInContainer` property (reads `DOTNET_RUNNING_IN_CONTAINER`) and use it in `HelpMenu` instead of `ApplicationHelper.IsInContainer` - Add `UserManager.SyncRolesAsync` extension — bidirectional role sync (removes obsolete roles, adds new ones atomically) - Simplify `EfCoreExtensions` to use `scope.GetRequiredService()` shorthand - Simplify `ServiceScopeExtensions.GetDbContextAsync()` to expression body - Simplify `EditDialog` null-checks with null-conditional operators, remove redundant `if` blocks - Inject `CookieThemeService` in `EmptyLayout` - Minor cleanup in `ApplicationHelper`, `PveSearchProvider`, `ResourceUsageGaugeStacked` ## Test plan - [ ] Verify deployment label in Help menu shows "Docker" when running in container - [ ] Verify `SyncRolesAsync` adds and removes roles correctly - [ ] Verify EditDialog still validates and submits correctly
kerem 2026-02-26 17:37:39 +03:00
kerem changed title from [PR #192] [MERGED] chore: Core misc improvements — BuildInfo.IsInContainer, SyncRolesAsync, EditDialog cleanup to [PR #192] chore: Core misc improvements — BuildInfo.IsInContainer, SyncRolesAsync, EditDialog cleanup 2026-03-07 19:57:22 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cv4pve-admin#185
No description provided.