Merged
Conversation
Added TaskCascadeDeletionMeta and updated SharedDeletionService to handle cascade deletion of tasks when deleting channels. Refactored TaskService to support organization-scoped operations and retrieval of tasks by channel. Modified TaskRepository interface to require organizationId for find and save operations. Removed unused getByProjectId from ChannelService.
Introduces TaskCreateCommand for encapsulating task creation parameters and TaskCreateUseCase for handling the creation logic, including access control and task instantiation. These additions support structured task creation within the application.
Introduces TaskPatchCommand and TaskPatchUseCase to support patching tasks with title, description, priority, timestamps, and status. Extends AccessControlService with task-level access checks and role access methods. Refactors patch use cases for channel, organization, and project to use ModificationMeta.emptyList(). Adds organization validation methods to Task and utility methods to ModificationMeta.
Replaces static version '0.0.1-DEV' with 'dev-${maven.build.timestamp}' in all backend modules for dynamic versioning. Adds maven.build.timestamp.format property. Also updates ProjectController OpenAPI documentation, cleans up PatchRequest, and adjusts TaskRepositoryImpl to accept organizationId.
Introduces the @DisplayPatchOperations annotation and a custom OperationCustomizer to dynamically append allowed patch operations to OpenAPI descriptions. Refactors ProjectController to use the new annotation and updates PatchOperationEnum with utility methods for listing operation names. This improves API documentation clarity and maintainability.
Introduces TaskDeleteCommand and TaskDeleteUseCase for handling task deletion with access control. Updates AccessControlService to grant MANAGE access to task owners, refactors SharedDeletionService to use deleteTaskCascade, and adds ownership checks to Task domain model.
Introduces TaskFetchCommand and TaskFetchUseCase to enable fetching a task with access control checks. Also annotates TaskDeleteUseCase with @service for Spring component scanning.
Introduces TaskBatchFetchCommand and TaskBatchFetchUseCase to support fetching multiple tasks at once with access control checks. Also adds @nonnull annotations to relevant fields in TaskFetchCommand and TaskFetchUseCase.Result for improved null safety.
Introduces TasksInChannelCommand and TasksInChannelUseCase to retrieve all task IDs in a channel with access control. Also makes projectId in ChannelsInProjectCommand final and adds access check in ChannelsInProjectUseCase.
8 tasks
NikodemCyrzan
approved these changes
Dec 26, 2025
scraft-official
added a commit
that referenced
this pull request
Jan 4, 2026
* Implement cascade deletion for tasks and channels
Added TaskCascadeDeletionMeta and updated SharedDeletionService to handle cascade deletion of tasks when deleting channels. Refactored TaskService to support organization-scoped operations and retrieval of tasks by channel. Modified TaskRepository interface to require organizationId for find and save operations. Removed unused getByProjectId from ChannelService.
* Add TaskCreateCommand and TaskCreateUseCase classes
Introduces TaskCreateCommand for encapsulating task creation parameters and TaskCreateUseCase for handling the creation logic, including access control and task instantiation. These additions support structured task creation within the application.
* Add task patch use case and enhance access control
Introduces TaskPatchCommand and TaskPatchUseCase to support patching tasks with title, description, priority, timestamps, and status. Extends AccessControlService with task-level access checks and role access methods. Refactors patch use cases for channel, organization, and project to use ModificationMeta.emptyList(). Adds organization validation methods to Task and utility methods to ModificationMeta.
* Update versioning to use maven build timestamp
Replaces static version '0.0.1-DEV' with 'dev-${maven.build.timestamp}' in all backend modules for dynamic versioning. Adds maven.build.timestamp.format property. Also updates ProjectController OpenAPI documentation, cleans up PatchRequest, and adjusts TaskRepositoryImpl to accept organizationId.
* Enhance OpenAPI docs with dynamic patch operations
Introduces the @DisplayPatchOperations annotation and a custom OperationCustomizer to dynamically append allowed patch operations to OpenAPI descriptions. Refactors ProjectController to use the new annotation and updates PatchOperationEnum with utility methods for listing operation names. This improves API documentation clarity and maintainability.
* Add task deletion use case and owner access logic
Introduces TaskDeleteCommand and TaskDeleteUseCase for handling task deletion with access control. Updates AccessControlService to grant MANAGE access to task owners, refactors SharedDeletionService to use deleteTaskCascade, and adds ownership checks to Task domain model.
* Add TaskFetch use case and command implementation
Introduces TaskFetchCommand and TaskFetchUseCase to enable fetching a task with access control checks. Also annotates TaskDeleteUseCase with @service for Spring component scanning.
* Add batch fetch use case for tasks
Introduces TaskBatchFetchCommand and TaskBatchFetchUseCase to support fetching multiple tasks at once with access control checks. Also adds @nonnull annotations to relevant fields in TaskFetchCommand and TaskFetchUseCase.Result for improved null safety.
* Add TasksInChannel use case and command
Introduces TasksInChannelCommand and TasksInChannelUseCase to retrieve all task IDs in a channel with access control. Also makes projectId in ChannelsInProjectCommand final and adds access check in ChannelsInProjectUseCase.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several enhancements and improvements across the backend API and application layers, focusing on access control, OpenAPI documentation, and cascading deletion logic. The most significant changes include the addition of fine-grained access control methods for tasks, improved OpenAPI documentation for PATCH operations, and enhanced cascading deletion for channels and tasks. There are also minor improvements to code consistency and project metadata.
Access Control Enhancements:
AccessControlService, including methods to check and enforce member access and role access at various levels of granularity. This ensures consistent and secure permission checks for task-related operations. [1] [2] [3]OpenAPI Documentation Improvements:
OperationCustomizerbean inOpenApiConfigto dynamically append allowed patch operations to the description of PATCH endpoints using the@DisplayPatchOperationsannotation, improving API documentation clarity. [1] [2] F5d6d352L5R5, [3] [4]Cascading Deletion Logic:
SharedDeletionServiceto handle cascading deletion of tasks when a channel or project is deleted, ensuring related entities are properly cleaned up. This includes callingdeleteTaskCascadefor each task in a deleted channel. [1] [2] [3] [4]Consistency and Code Quality Improvements:
ModificationMeta.emptyList()in patch use cases for channels, organizations, and projects, improving code clarity and reducing potential errors. [1] [2] [3]finaland adding@ToStringand@NonNullwhere appropriate. [1] [2] [3]Project Metadata and Build Improvements:
dev-${maven.build.timestamp}) for better traceability of builds. [1] [2]