#1350: PFUserDO.kt

projectforge-business/src/main/kotlin/org/projectforge/framework/persistence/user/entities/PFUserDO.kt Data Object, projectforge-business/src/main/kotlin/org/projectforge/framework/persistence/user/entities/PFUserDO.kt 466 lines · 260 code · 148 comments · 58 blank
Hibernate entity/DO representing a ProjectForge user (PFUser), mapping to the user database table with fields for credentials, personal data, roles, and status.

Architecture Analysis

Resides in projectforge-business, the core module containing domain logic, services, and persistence. Defines a fixed set of named constants, often implementing I18nEnum for internationalized display labels.

Git History

CommitWhat changed
c771cc4458Refactor projectforge-keycloak to projectforge-idp with Authentik support
570213d367Fix recurring false-positive sync updates; add keycloakId to PFUserDO; remove KeycloakMigrationRest
b781485583Add Keycloak integration: new projectforge-keycloak module
868d6abb752025 -> 2026
aec1e30ab4History supports now user comments: If groups or users are edited, the admin may enter a history comment with e.g. the reason of changes. This comment is displayed in the history.
fb6eec1219PFUserDO.getRight removed (isn't stable, rights are lazy fetched)
11dbfab8c3Userright handling in PFUserDO and UserGroupCache improved (rights of user may not be initialized).
63081666f6Source file headers: 2024-> 2025.
0237d5eba9Json serialization refactored: IdOnlySerializer and IdsOnlySerializer introduced.
5f9bbfbd37Fix typos in projectforge-business directory
b71b5073d3Migration stuff in progress... (all tests of all packages: OK).
bbc198d030Migration stuff in progress... (all tests of all packages: OK).
4bc37b3a14Migration stuff in progress...
c8f8ed9357Declared all entities as FetchType.LAZY (was EAGER).
1ddff3f998Migration stuff in progress... (all tests of all packages: OK).
6be167dc19Migration stuff in progress...
0b32a3f37bMigration stuff in progress...
9f874e26c9MAJOR-CHANGE! Migration of integer id's to Long id's (including fk's etc.)
974d70bec9Migration stuff in progress...
ad9ac6b638Migration stuff in progress...
f5c09f87f4Migration stuff in progress...
4f5a458c93Migration stuff in progress...
c04fb0d51cMigration stuff in progress...
06828f4908Migration stuff in progress...
b6092df092Copyright 2023 -> 2024
46b3db42e9DataTransfer: renamed: audit -> activities. (Code cleanup in PFUserDO and comment in SessionCsrfService)
ab45d51fa4Copyright 2001-2022 -> 2001-2023.
57f08f175dHistoryService supports now registered adapters (started with User adapter for showing right changes).
2082eadbe7WIP: UserPagesRest
3f255ea6f4WIP: UserPagesRest
3256dc0793(WLAN)-Password changing refactored (is now used for changing own passwords and other's passwords by admins).
ea7ec2556fRefactored (due to security reasons): PFUserDO.password -> UserPasswordDO.passwordHash
5430f7219bWIP UserPagesRest
371151e142Excel eport, WIP UserPagesRest
e6ac76316aPFUserDO.username and GroupDO.name: @Field analyze again. Analyze.NO doesn't work well.
f293c38e80GroupDO.name and PFUserDO.username: don't analyze fields for search
4588908f21PFUserDO: getFullname returns username if neither first nor last name is given.
59c099e808PFUserDO: getFullname returns username if neither first nor last name is given.
00b4e44ff2WIP: WebAuthn
d665c5d14aUserAuthenticationsDO: dates of creation of tokens and keys added for information and expiration purposes.
f1a12e2e5eMEB functinoality and SmsReceiverServlet removed.
5f7ef41b8cCopyright 2021 -> 2022
c515a34b56UserEditPage/MyAccount: GPG public key added.
0ea43f2dd3PFUserDO.mobilePhone
9b41a4b319PFUserDO.nickName -> nickname.
91879ce652User: gender and nickname added. Export user list as Excel added to UserListPage.
68e0d396ebUser.toIntList filters null values, InitTestDB: test group contains now test user 1 and 2, PFUserDO/GroupDO.tointList added.
0ab100d216Configuration refactored (GlobalConfiguration not needed anymore). SEPA export should now erease unprintable chars.
c0f2b9de04Tenants functionality removed everywhere (untested).
ceb63e8a1bSource code header: (C) 2001-2021.
9e265e5c8bMerge branch 'develop' into ReactMigration
4730adcd70PFUserDO.timeZoneString must be declared as open.
1be32b03cfPFUser.timeZone refactored (timeZoneString). timeZoneObject removed.
b9f089d12fMerge branch 'develop' into ReactMigration
1f0dae855aPFUserDO, UserPagesRest: Fix i18nKeys and and Group Selector to React Page
6d99ca8ed3WIP: UserTokenType's...
bdabb065c1Merge branch 'develop' into TimeClassReplacements
6874f66b44FirstDayOfWeek...
7c1c487822Replacing more instance of java.sql.Date with java.time.LocalDate Replacing instances of java sql.Timestamp with java.util.Date
9da37a9c7cDTO's are now DisplayObjects (implementing DisplayNameCapable).
b78b870bd9ShortDisplayNameCapable -> DisplayNameCapable.
aa07a1093cPFUserDO.fullname reverted.
2307033691React: IShortDisplayObject.
7c79f1922cCopyright of source header -> 2020.
4b53b65623PFDate -> PFDay, IPFDate introduced..
fe79d78ddaHeavy WIP: migration of Calendar, DateHolder, DayHolder etc.
8c31eba2a3Heavy WIP: migration of Calendar, DateHolder, DayHolder etc.
9de5dc2773Merge branch 'develop' into TimeClassReplacements
8241700f00ShortDisplayNameCapable converted to Kotlin. DO classes implementing ShortDisplayNameCapable refactored.
4cd7c8e693Replace DateHolder and DayHolder methods with PFDateTime
de4e1b33f7PFUserDO: java doc of firstDayOfWeek fixed.
e92b3afd07Jackson: JsonBackReference/JsonManagedReference -> JsonIdentityInfo
8675a1dbefFound big performance issue: Declared all Kotlin JPA entities and their properties as open. Lazy loading wasn't supported by Hibernate and results in thousands of JPA queries...
af35917ac2More code cleanup
a2586c86caJacksonConfiguration: at default, unknown properties will result in Bad Requests (an exception will be thrown) again. Now, special properties may be register at JacksonConfiguration for avoiding an exception (e. g. fullname of PFUserDO).
fe5a7c9828Heavy WIP: NamedQueries everywhere... Plugin crm removed.
510e8d7969Heavy WIP: NamedQueries everywhere...
a907a0b5faPFUserDO: silly search fields removed.
050a5ccd70@NoHistory needed as field annotation: @field:NoHistory.
05244ff19eCopyRight of all Kotlin file-header updated or created.
96a382a7f2PFUserDO: Add attributes to edit and list page (secret elements currently commented out)
10c2bed496!!!UserDao, UserService: More protection of PFUserDO's secret fields. Elements after loading must be evicted (otherwise the db is modified by ereasing the secret fields)
e772507cbf!!!UserDao, UserService: More protection of PFUserDO's secret fields.
2fe6916808PFUserDO.getUserDisplayname and getDisplayUsername merged. PFUserDO: Javadoc, copyValues calls checkAndFixPassword again. getFullname: more Kotlin style.
4f73bf99efPFUserDO.toString produces now json object (without secret fields). Spooky method copyValuesFrom removed.
0475167da4PFUserDO: Code review and code optimizations...
614328623ePFUserDO.java -> PFUserDO.kt