Services

Parent namespace: Backend

Namespaces

TypeDescription
CreateNewBoardServiceService for promoting candidate board members to actual board members at the start of a new financial year. This service checks if the promotion has already been done for the current year to avoid duplicate promotions. If not, it retrieves the candidate board members from the previous year and creates new board memberships for them in the current year, while also enqueuing messages to update their group memberships in the auth system.
MembershipExpirationSyncServiceBackground worker that periodically re-syncs members' auth-system access level to account for membership payments that expire purely due to elapsed time. Unlike board rotation (a discrete action) or a new payment (a discrete event), a membership silently lapsing once its expiration window passes has no other trigger point in the backend that would refresh the member's cached Keycloak access_level, so this worker exists specifically to catch that case.
PaymentSyncServiceBackground worker that periodically reconciles pending payments with the payment provider.
PermissionServiceImplements permission and authorization checks for group and role memberships.
YearSettingsRefreshWorker
FinancialYearStartDate
CommitteeCreationDateGetYearForDate (and everything built on it - organizer authorization tiers, activity visibility, target-audience checks) is called from plenty of places that aren't DI-managed (static extension methods, POCO helpers), which is why these two settings are read through mutable static fields rather than a scoped/injected service. DatabaseSeeder sets them once at startup, and SettingsService additionally updates them the moment a board member changes the setting - but that update only lands on whichever replica handled the request. With more than one backend replica running, every other replica would otherwise keep using the stale value until it happens to restart, which can make the same request succeed or 403 depending on which
_refreshInterval