Skip to content

Commit

Permalink
Merge branch 'release/27.x'
Browse files Browse the repository at this point in the history
* release/27.x:
  #3831 - Better support a direct-access workflow
  Issue #3571: Update dependencies
  • Loading branch information
reckart committed Mar 7, 2023
2 parents 7d8fd75 + d603ea6 commit 49a4ea5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import static de.tudarmstadt.ukp.clarin.webanno.model.PermissionLevel.CURATOR;
import static de.tudarmstadt.ukp.clarin.webanno.model.PermissionLevel.MANAGER;
import static de.tudarmstadt.ukp.clarin.webanno.support.WebAnnoConst.CURATION_USER;
import static org.apache.commons.collections4.CollectionUtils.containsAny;

import java.util.List;
Expand Down Expand Up @@ -91,15 +90,17 @@ public boolean canViewAnnotationDocument(String aUser, String aProjectId, long a
return false;
}

// Annotators can see their own annotations and manager/curators can see annotations of
// all users
if (!aUser.equals(aAnnotator) && !permissionLevels.contains(MANAGER)
&& !(CURATION_USER.equals(aUser)
&& containsAny(permissionLevels, MANAGER, CURATOR))) {
// Managers and curators can see anything
if (containsAny(permissionLevels, MANAGER, CURATOR)) {
return true;
}

// Annotators can only see their own documents
if (!aUser.equals(aAnnotator)) {
return false;
}

// Blocked documents cannot be viewed
// Annotators cannot view blocked documents
SourceDocument doc = documentService.getSourceDocument(project.getId(), aDocumentId);
if (documentService.existsAnnotationDocument(doc, aAnnotator)) {
AnnotationDocument aDoc = documentService.getAnnotationDocument(doc, aAnnotator);
Expand Down
2 changes: 1 addition & 1 deletion inception/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<dkpro.version>2.3.0</dkpro.version>
<uima.version>3.4.1</uima.version>
<uimafit.version>3.4.0</uimafit.version>
<uima-json.version>0.4.0</uima-json.version>
<uima-json.version>0.5.0</uima-json.version>

<pdfbox.version>2.0.27</pdfbox.version>

Expand Down

0 comments on commit 49a4ea5

Please sign in to comment.