anchor.diff:  
       String action = null;
   
  -    if( parms.ackType == AlarmFactory.AcknowledgeType.UNACKNOWLEDGED ) {
  -        action = AcknowledgeAlarmServlet.ACKNOWLEDGE_ACTION;
  +    if( !(request.isUserInRole( Authentication.READONLY_ROLE ))) {     
  +        if( parms.ackType == AlarmFactory.AcknowledgeType.UNACKNOWLEDGED ) {
  +            action = AcknowledgeAlarmServlet.ACKNOWLEDGE_ACTION;
  +        } 
  +        else if( parms.ackType == AlarmFactory.AcknowledgeType.ACKNOWLEDGED ) {
  +            action = AcknowledgeAlarmServlet.UNACKNOWLEDGE_ACTION;
  +        }
       } 
  -    else if( parms.ackType == AlarmFactory.AcknowledgeType.ACKNOWLEDGED ) {
  -        action = AcknowledgeAlarmServlet.UNACKNOWLEDGE_ACTION;
  -    }
   
       int alarmCount = AlarmFactory.getAlarmCount( parms.ackType, parms.getFilters() );    
       
  
positive.code:       <!-- end menu -->      
  
        <!-- hidden form for acknowledging the result set --> 
        <form action="alarm/acknowledgeByFilter" method="POST" name="acknowledge_by_filter_form">    
          <input type="hidden" name="redirectParms" value="<%=request.getQueryString()%>" />
          <input type="hidden" name="action" value="<%=action%>" />
          <%=org.opennms.web.Util.makeHiddenTags(request)%>
        </form>      
  
  
  
  
negative.code:               </p>           
              <% } %>
  
        <% if( !(request.isUserInRole( Authentication.READONLY_ROLE ))) { %>
            <form action="alarm/acknowledge" method="POST" name="acknowledge_form">
            <input type="hidden" name="redirectParms" value="<%=request.getQueryString()%>" />
            <input type="hidden" name="action" value="<%=action%>" />
            <%=org.opennms.web.Util.makeHiddenTags(request)%>
        <% } %>
  			<jsp:include page="/includes/key.jsp" flush="false" />
        <table>
  				<thead>
  					<tr>
                                               <% if( !(request.isUserInRole( Authentication.READONLY_ROLE ))) { %>
  						<% if ( parms.ackType == AlarmFactory.AcknowledgeType.UNACKNOWLEDGED ) { %>
  							<th width="1%">Ack</th>
  							<% } else { %>
  								<th width="1%">UnAck</th>
  								<% } %>
                                                  <% } else { %>
                                                          <th width="1%">&nbsp;</th>
                                                  <% } %>
  								<th width="1%"> <%=this.makeSortLink( parms, AlarmFactory.SortStyle.ID,        AlarmFactory.SortStyle.REVERSE_ID,        "id",        "ID" )%></th>
  								<th width="10%"><%=this.makeSortLink( parms, AlarmFactory.SortStyle.SEVERITY,  AlarmFactory.SortStyle.REVERSE_SEVERITY,  "severity",  "Severity"  )%></th>
  								<th width="22%"><%=this.makeSortLink( parms, AlarmFactory.SortStyle.NODE,      AlarmFactory.SortStyle.REVERSE_NODE,      "node",      "Node"      )%></th>
  