Ignore:
Timestamp:
Oct 19, 2016, 2:18:53 PM (6 years ago)
Author:
Nicklas Nordborg
Message:

References #2034: New permission for annotating items

The "Edit annotation" icon in the "Annotations & parameters" tab should be enabled when the logged in user has RESTRICTED_WRITE permission.

The "Save" button in the "Edit annotations" dialog should be enabled if the logged in user has RESTRICTED_WRITE permission.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/common/annotations/annotate.jsp

    r7206 r7213  
    113113    item = (Annotatable)itemType.getById(dc, itemId);
    114114  }
    115   final boolean writePermission = item == null ? true : item.hasPermission(Permission.WRITE);
     115  final boolean annotatePermission = item == null ? true : item.hasPermission(Permission.RESTRICTED_WRITE);
    116116 
    117117  // Load the current item and it's protocol
     
    792792      </div>
    793793      <base:buttongroup subclass="dialogbuttons topborder">
    794         <base:button id="btnSave" title="Save" visible="<%=writePermission%>" />
    795         <base:button id="close" title="Cancel"  visible="<%=writePermission%>" />
    796         <base:button id="close" title="Close" visible="<%=!writePermission%>" />
     794        <base:button id="btnSave" title="Save" visible="<%=annotatePermission%>" />
     795        <base:button id="close" title="Cancel"  visible="<%=annotatePermission%>" />
     796        <base:button id="close" title="Close" visible="<%=!annotatePermission%>" />
    797797      </base:buttongroup>
    798798      <form name="modified" method="post" action="index.jsp?ID=<%=ID%>">
Note: See TracChangeset for help on using the changeset viewer.