Changeset 7207


Ignore:
Timestamp:
Oct 19, 2016, 10:42:45 AM (6 years ago)
Author:
Nicklas Nordborg
Message:

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

Changes in the web interface (Overview tab) 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/common/overview/info.jsp

    r6962 r7207  
    468468                String icon = at != null && at.isProtocolParameter() ?
    469469                    "parameter.png" : "annotation.png";
    470                 boolean editPermission = annotatable.hasPermission(Permission.WRITE);
     470                boolean editPermission = snapshot.hasPermission(dc, Permission.WRITE);
    471471                %>
    472472                <tbl:row>
     
    551551                    if (fix == null) continue;
    552552                    BasicItem fixItem = fix.getItem();
    553                     boolean enabled = fixItem.hasPermission(Permission.WRITE);
    554553                    AnnotationType at = fix.getAnnotationType();
    555554                    Annotation a = fix.getAnnotation();
     555                    boolean enabled = a != null ?
     556                      a.hasPermission(Permission.WRITE) : fixItem.hasPermission(Permission.WRITE);
    556557                    String autoInit = "";
    557558                    if (enabled)
Note: See TracChangeset for help on using the changeset viewer.