Ignore:
Timestamp:
Sep 26, 2012, 12:48:41 PM (12 years ago)
Author:
dwinter
Branch:
default
Message:

authorisation added
js / css aufgeraeumt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorAnnotationsByTags.java

    r31 r37  
    1818import de.mpiwg.itgroup.annotations.Annotation;
    1919import de.mpiwg.itgroup.annotations.NS;
     20import de.mpiwg.itgroup.annotations.Person;
    2021import de.mpiwg.itgroup.annotations.Tag;
    2122import de.mpiwg.itgroup.annotations.neo4j.AnnotationStore;
     
    3839        setCorsHeaders();
    3940       
     41        // do authentication
     42        Person authUser = Person.createPersonWithId(this.checkAuthToken(entity));
     43        logger.debug("request authenticated=" + authUser);
     44
     45       
    4046        String jsonId = (String) getRequest().getAttributes().get("id");
    4147       
     
    6066       
    6167                for (Annotation annot : annotations) {
    62             JSONObject jo = createAnnotatorJson(annot,false);
     68                        //check permission
     69                        if (!annot.isActionAllowed("read", authUser, store)) continue;
     70           
     71                        JSONObject jo = createAnnotatorJson(annot,false);
    6372            results.add(jo);
    6473        }
Note: See TracChangeset for help on using the changeset viewer.