#1033: PollDao.kt

projectforge-business/src/main/kotlin/org/projectforge/business/poll/PollDao.kt DAO (Poll), projectforge-business/src/main/kotlin/org/projectforge/business/poll/PollDao.kt 92 lines · 60 code · 23 comments · 9 blank
DAO for poll master records. Extends BaseDao with custom access control beyond the standard user right check. Implements multi-faceted access: poll owner, explicit full access users, explicit full access groups (resolved through GroupService), and attendee status.

Access Control

Overrides hasAccess with three-tier checking:

  1. SELECT: Grants access if user has full access (owner, explicit user, or group member) OR is an attendee.
  2. Other operations: Only full access users can insert/update/delete.
  3. hasFullAccess: Checks owner ID, fullAccessUserIds CSV, and fullAccessGroupIds CSV (via GroupService.getGroupUsers).

Git History

868d6abb7 2025 -> 2026
63081666f Source file headers: 2024-> 2025.
67805f2fc ThreadLocalUserContext.user -> ThreadLocalUserContext.loggedInUser
4c04cfd65 MAJOR-CHANGE! Migration of integer id's to Long id's.
5bafe7941 @Repository -> @Service. @Transactional-Annotations removed.
e33c8b9c2 Migration stuff in progress...
b6092df09 Copyright 2023 -> 2024
b89441787 Added State.FINISHED_AND_MAIL_SENT and smaller fixes
4e4d94bc4 delegated user can now be attendee OR full access user
cdb862e09 fixed delegation bugs and contains() mistake on string
5cfd12067 Reformat code, some logging, i18n & Source Headers
25185faa0 Add Attendee and Access filter.
be1f00a8f accessuser and accessgroup
17c9ac5c6 change data object and database
24744bd53 change PollDao from Java to Kotlin