Ignore:
Timestamp:
Oct 19, 2016, 12:51:44 PM (6 years ago)
Author:
Nicklas Nordborg
Message:

References #2033: Permissions for annotating items may be incorrectly implemented

Changes in the web interface (Experimental factors in various places) so that the "edit" icon is only visible if the user has permission to modify an annotation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/views/experiments/view_experiment.jsp

    r7166 r7210  
    559559                      for (AnnotationSnapshot a : all)
    560560                      {
     561                        boolean annotatePermission = a.hasPermission(dc, Permission.WRITE);
    561562                        factorValuesCount.put(at, factorValuesCount.get(at)+1);
    562563                        List values = a.getActualValues();
     
    572573                          data-annotation-type="<%=at.getId() %>"
    573574                          data-annotation="<%=a.getThisAnnotationId()%>"
    574                           visible="<%=writePermission%>"
     575                          visible="<%=annotatePermission%>"
    575576                          image="<%=isUpToDate ? "edit.png" : "edit-outofsync.png"%>"
    576577                          tooltip="Modify the values of this experimental factor"
     
    617618          jsonAt.put("id", at.getId());
    618619          jsonAt.put("disableInheritance", at.getDisableInheritance() ? 1 : 0);
     620          jsonAt.put("usePermission", at.hasPermission(Permission.USE) ? 1 : 0);
    619621          jsonAt.put("numRawBioAssaysWithFactor", factorValuesCount.get(at));
    620622
Note: See TracChangeset for help on using the changeset viewer.