EN · DE · RU · FR · ES

#286: TodoPluginUserRightId.kt

plugins/org.projectforge.plugins.todo/src/main/kotlin/org/projectforge/plugins/todo/TodoPluginUserRightId.kt Enum — user right ID, plugins/org.projectforge.plugins.todo/src/main/kotlin/org/projectforge/plugins/todo/TodoPluginUserRightId.kt 57 lines · 24 code · 27 comments · 6 blank
Kotlin enum defining the PLUGIN_TODO user right for the To-Do plugin. Implements IUserRightId and integrates with Hibernate Search for full-text indexing of access rights.

Architecture

This enum implements the IUserRightId interface, which is the standard mechanism for declaring access-right identifiers in ProjectForge. Each enum constant has:

The inner ProviderService class extends RightRightIdProviderService, which is itself a ServiceLoader-registered class (see META-INF/services/) that the framework scans to discover all user-right definitions. The @TypeBinding annotation with HibernateSearchUserRightIdTypeBinder ensures that user rights assigned via this enum are indexed in the Hibernate Search full-text index, enabling permission-aware search filtering.

Inheritance & Integration

The class hierarchy is: TodoPluginUserRightId → implements IUserRightId (extends Comparable). The framework collects all IUserRightId implementations across all plugins and core modules, then registers them in the admin user-right configuration pages. The To-Do plugin contributes exactly one right: PLUGIN_TODO, which grants access to to-do list functionality.

Git History

868d6abb7 2025 -> 2026\n63081666f Source file headers: 2024-> 2025.\n067a4cbb1 Migration stuff in progress...\nb1560ca43 Migration stuff in progress...\ne33c8b9c2 Migration stuff in progress...