Changeset 41:5d4260344db5 in AnnotationManagerN4J for src/main
- Timestamp:
- Sep 26, 2012, 12:59:00 PM (13 years ago)
- Branch:
- default
- Parents:
- 40:03e0f7574224 (diff), 39:1cf5fca36633 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Location:
- src/main
- Files:
-
- 3 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorAnnotations.java
r37 r41 24 24 import de.mpiwg.itgroup.annotations.Annotation; 25 25 import de.mpiwg.itgroup.annotations.Person; 26 import de.mpiwg.itgroup.annotations.Tag;27 26 import de.mpiwg.itgroup.annotations.neo4j.AnnotationStore; 28 27 import de.mpiwg.itgroup.annotations.restlet.utils.JSONObjectComparator; -
src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorAnnotations.java
r40 r41 55 55 logger.debug("annotation-id=" + id); 56 56 57 58 // do authentication 59 Person authUser = Person.createPersonWithId(this.checkAuthToken(entity)); 60 logger.debug("request authenticated=" + authUser); 61 57 62 if (id == null) { 58 63 59 return getAllAnnotations(); 60 } 61 62 // do authentication 63 Person authUser = Person.createPersonWithId(this.checkAuthToken(entity)); 64 logger.debug("request authenticated=" + authUser); 65 64 return getAllAnnotations(authUser); 65 } 66 67 66 68 AnnotationStore store = getAnnotationStore(); 67 69 Annotation annot = store.getAnnotationById(id); … … 82 84 } 83 85 84 private Representation getAllAnnotations( ) {86 private Representation getAllAnnotations(Person authUser) { 85 87 86 88 Form form = getRequest().getResourceRef().getQueryAsForm(); … … 97 99 List<Annotation> annotations = store.getAnnotations(null, null); 98 100 for (Annotation annotation : annotations) { 99 101 //check permission 102 if (!annotation.isActionAllowed("read", authUser, store)) continue; 103 100 104 JSONObject jo = createAnnotatorJson(annotation,false); 101 105 results.add(jo);
Note: See TracChangeset
for help on using the changeset viewer.