Here is how to prevent regular users from seeing the delete playlist link.
We are going to edit the loadPlaylist.jsp file, found at Subsonic/jetty/[build]/webapp/WEB-INF/jsp/loadPlaylist.jsp.
Here is the portion of code we are going to edit:
- Code: Select all
<c:choose>
<c:when test="${model.load}">
<div class="forward"><a href="${loadUrl}"><fmt:message key="playlist.load.load"/></a></div>
<c:if test="${model.user.downloadRole}">
<div class="forward"><a href="${downloadUrl}"><fmt:message key="common.download"/></a></div>
</c:if>
<c:if test="${model.user.playlistRole}">
<div class="forward"><a href="javascript:deletePlaylist('${deleteUrl}')"><fmt:message key="playlist.load.delete"/></a></div>
</c:if>
</c:when>
<c:otherwise>
<c:if test="${model.user.playlistRole}">
<div class="forward"><a href="${appendUrl}"><fmt:message key="playlist.load.append"/></a></div>
</c:if>
</c:otherwise>
</c:choose>
Edit the test for the deletePlaylist link to ${model.user.adminRole}.