Changeset 105:7417f5915181 in AnnotationManagerN4J for src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorAnnotations.java
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorAnnotations.java
r102 r105 42 42 43 43 import de.mpiwg.itgroup.annotations.Annotation; 44 import de.mpiwg.itgroup.annotations.Annotation.Action; 44 45 import de.mpiwg.itgroup.annotations.Person; 45 46 import de.mpiwg.itgroup.annotations.neo4j.AnnotationStore; … … 95 96 Annotation annot = store.getAnnotationById(id); 96 97 if (annot != null) { 97 if (!annot.isActionAllowed( "read", authUser, store)) {98 if (!annot.isActionAllowed(Action.read, authUser, store)) { 98 99 setStatus(Status.CLIENT_ERROR_FORBIDDEN, "Not Authorized!"); 99 100 return null; … … 116 117 for (Annotation annotation : annotations) { 117 118 // check permission 118 if (!annotation.isActionAllowed( "read", authUser, store))119 if (!annotation.isActionAllowed(Action.read, authUser, store)) 119 120 continue; 120 121 // add annotation to list … … 238 239 return null; 239 240 } 240 if (!storedAnnot.isActionAllowed( "update", authUser, store)) {241 if (!storedAnnot.isActionAllowed(Action.update, authUser, store)) { 241 242 setStatus(Status.CLIENT_ERROR_FORBIDDEN); 242 243 return null; … … 287 288 Annotation annot = store.getAnnotationById(id); 288 289 if (annot != null) { 289 if (!annot.isActionAllowed( "delete", authUser, store)) {290 if (!annot.isActionAllowed(Action.delete, authUser, store)) { 290 291 setStatus(Status.CLIENT_ERROR_FORBIDDEN, "Not Authorized!"); 291 292 return null;
Note: See TracChangeset
for help on using the changeset viewer.