Issue #2389: Prevent curation until annotation finished#5897
Conversation
- Prevent annotators from re-opening documents when they are in a curation state even if re-opening is allowed otherwise
- Prevent annotators from starting annotations on documents that are already in curation - unless the curator explicitly put the annotator's document back into progress
…ON_FINISHED * main: #2389 - Prevent curation until ANNOTATION_FINISHED
…ON_FINISHED * main: #5895 - Concept features cannot be marked as required
There was a problem hiding this comment.
Pull request overview
This PR implements access control restrictions to prevent annotators from interfering with documents during the curation phase. The changes ensure that once a document enters curation (CURATION_IN_PROGRESS or CURATION_FINISHED), annotators cannot start new annotations or re-open finished annotations unless explicitly allowed by a curator or manager.
Changes:
- Added logic in
DocumentAccessImplto block annotators from starting work on documents in curation states - Enhanced
MatrixWorkflowActionBarItemGroupto prevent annotators from re-opening documents during curation - Added comprehensive unit tests covering the new access control scenarios
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| DocumentAccessImpl.java | Implements core access control logic preventing annotators from editing documents in curation states unless their annotation document is explicitly in IN_PROGRESS |
| MatrixWorkflowActionBarItemGroup.java | Prevents annotators from re-opening documents in the matrix workload UI when documents are in curation states |
| DocumentAccessImplTest.java | Adds unit tests covering the new curation-blocking scenarios for annotators and the exception for explicitly reopened documents |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Formatting
- Additional checks at the access level incl tests - Formatting
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ON_FINISHED * main: #4941 - Mapping OIDC groups to INCEpTION's internal roles #5716 - Multiple no-label suggestions if there are multiple recommenders for different features on one layer #5716 - Multiple no-label suggestions if there are multiple recommenders for different features on one layer #5716 - Multiple no-label suggestions if there are multiple recommenders for different features on one layer #4941 - Mapping OIDC groups to INCEpTION's internal roles #4941 - Mapping OIDC groups to INCEpTION's internal roles #4941 - Mapping OIDC groups to INCEpTION's internal roles #4941 - Mapping OIDC groups to INCEpTION's internal roles #4941 - Mapping OIDC groups to INCEpTION's internal roles #4941 - Mapping OIDC groups to INCEpTION's internal roles #4941 - Mapping OIDC groups to INCEpTION's internal roles #4941 - Mapping OIDC groups to INCEpTION's internal roles 4941 - Mapping OIDC groups to INCEpTION's internal roles Replaced test ptoperties injection with inline properties rather than a dedicated file Refactored UT and code with native spring boot properties injection Wrote first basic UT Fixed gitattributes file and reupload badly encoded files Implemented feature. Existing UT done, but new ones must be written before cleaning and refactoring the feature Draft WIP Updated CRLF
- Avoid potential NPE when no document is open
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Improve message - Reduce database thrashing
0f29c14 to
df9cfe7
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Push decision about action into action handler
458a639 to
dfcc2e7
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
What's in the PR
How to test manually
Automatic testing
Documentation