Skip to content

feat: grant "eForm users" full planning view when no manager exists#1490

Merged
renemadsen merged 1 commit intostablefrom
feat/eform-users-visibility-fallback-no-managers
Apr 21, 2026
Merged

feat: grant "eForm users" full planning view when no manager exists#1490
renemadsen merged 1 commit intostablefrom
feat/eform-users-visibility-fallback-no-managers

Conversation

@renemadsen
Copy link
Copy Markdown
Member

Summary

  • Adds a narrow fallback to TimePlanningPlanningService.Index: when no AssignedSite has IsManager=true system-wide, users in the "eForm users" security group are promoted to the admin-for-visibility path so the planning dashboard isn't empty in that degenerate state.
  • Composite "Kun tid + WebAccess" users (auto-added to both groups by BackendConfigurationAssignmentWorkerServiceHelper) are explicitly excluded and stay restricted to their own site — honoring the rule that "kun tid" users must only see their own time.
  • The 2026-04-10 filter (isAdmin = eFormAdminsGroup) is preserved; the fallback only fires when that gate fails.
  • Scope is strictly TimePlanningPlanningService.Index. TimeSettingService.GetAvailableSites and AbsenceRequestService.GetInboxAsync are untouched.

Test plan

  • In a tenant with zero AssignedSite.IsManager=true rows, log in as a non-admin user in "eForm users" → Time Planning > Plannings shows all workers.
  • Flip one AssignedSite.IsManager=true (via property-worker UI) → same user now sees only their own site.
  • Log in as a "Kun tid" user (property worker with timeRegistrationEnabled=true) in the same zero-manager tenant → still restricted to own site.
  • Log in as a composite "Kun tid + WebAccess" user in the zero-manager tenant → still restricted to own site.
  • Existing admin ("eForm admins" / admin role) flow unchanged — sees all workers regardless.

🤖 Generated with Claude Code

When no AssignedSite has IsManager=true anywhere in the tenant, promote
users in the "eForm users" security group to the admin-for-visibility
branch of TimePlanningPlanningService.Index so the planning dashboard
isn't empty in that degenerate state. Composite "Kun tid + WebAccess"
users (added to both groups by BackendConfigurationAssignmentWorker\
ServiceHelper) are explicitly excluded and stay restricted to own site.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@renemadsen renemadsen merged commit 1d9d441 into stable Apr 21, 2026
20 checks passed
@renemadsen renemadsen deleted the feat/eform-users-visibility-fallback-no-managers branch April 21, 2026 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant