Ignore:
Timestamp:
Feb 10, 2017, 2:45:35 PM (7 years ago)
Author:
casties
Branch:
default
Tags:
tip
Message:

check admin permission before changing permissions.
Enum for typesafe actions.

File:
1 edited

Legend:

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

    r91 r105  
    3636
    3737import de.mpiwg.itgroup.annotations.Annotation;
     38import de.mpiwg.itgroup.annotations.Annotation.Action;
    3839import de.mpiwg.itgroup.annotations.Person;
    3940import de.mpiwg.itgroup.annotations.neo4j.AnnotationStore;
     
    7778        for (Annotation annot : annots) {
    7879            // check permission
    79             if (!annot.isActionAllowed("read", authUser, store)) continue;
     80            if (!annot.isActionAllowed(Action.read, authUser, store)) continue;
    8081            JSONObject jo = createAnnotatorJson(annot, (authUser == null));
    8182            if (jo != null) {
Note: See TracChangeset for help on using the changeset viewer.