Changeset 7213


Ignore:
Timestamp:
Oct 19, 2016, 2:18:53 PM (5 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.

Location:
trunk/www/common/annotations
Files:
2 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%>">
  • trunk/www/common/annotations/list_annotations.jsp

    r7206 r7213  
    8787{
    8888  final Annotatable item = (Annotatable)itemType.getById(dc, itemId);
    89   final boolean writePermission = item.hasPermission(Permission.WRITE);
     89  final boolean writePermission = item.hasPermission(Permission.RESTRICTED_WRITE);
    9090  final SnapshotManager manager = new SnapshotManager();
    9191 
Note: See TracChangeset for help on using the changeset viewer.