#1345: ThreadLocalUserContext.kt

projectforge-business/src/main/kotlin/org/projectforge/framework/persistence/user/api/ThreadLocalUserContext.kt Service / Context, projectforge-business/src/main/kotlin/org/projectforge/framework/persistence/user/api/ThreadLocalUserContext.kt 269 lines · 132 code · 110 comments · 27 blank
Thread-local storage for the currently authenticated user context, providing static access to the logged-in user's identity, roles, and locale across request processing.

Architecture Analysis

Resides in projectforge-business, the core module containing domain logic, services, and persistence. Typically annotated with @Service or @Component, managed by the Spring IoC container with dependency injection.

Git History

CommitWhat changed
868d6abb752025 -> 2026
bbdb5825b2Scripts: exception -> log, UserContext.refreshUser() handling changed.
96e97e7389Nothing real.
00ec94e687New version of fr-opensagres-xdocreport-poi-xwpf-converter-pdf = "2.1.0" DataTransferBridge added for more convenient access of datatransfer from other modules (Merlin, business etc.), ThreadLocalUserContext improved for using inside Kotlin coroutines.
63081666f6Source file headers: 2024-> 2025.
1012e347afMigration stuff in progress... (all tests of all packages: OK).
67805f2fc1ThreadLocalUserContext.user -> ThreadLocalUserContext.loggedInUser (renamed for avoiding mis-understandings in code).
4c04cfd652MAJOR-CHANGE! Migration of integer id's to Long id's (including fk's etc.)
4e52742455Migration stuff in progress...
e33c8b9c20Migration stuff in progress...
b6092df092Copyright 2023 -> 2024
ab45d51fa4Copyright 2001-2022 -> 2001-2023.
7bc51ed170WIP: Jobs.
38bec971afThreadLocal -> Kotlin