Skip to content

Commit

Permalink
Merge branch 'issue-10' into develop
Browse files Browse the repository at this point in the history
Conflicts:
	carcv-webapp/src/main/webapp/app/cartable.jsp
  • Loading branch information
oskopek committed Apr 18, 2014
2 parents 8128832 + 619ae28 commit 30578c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ public class CarTableServlet extends HttpServlet {
@EJB
private EntryBean bean;

private static final String adminRole = "admin";

/**
* @see CarTableServlet
* @param request the HttpServletRequest
Expand Down Expand Up @@ -106,6 +108,10 @@ public int compare(FileEntry o1, FileEntry o2) {
}

request.setAttribute("wrtmList", wrtmList);

boolean isAdmin = request.isUserInRole(adminRole);
request.setAttribute("isAdmin", Boolean.valueOf(isAdmin));

RequestDispatcher rd = getServletContext().getRequestDispatcher("/app/cartable.jsp");
rd.forward(request, response);
}
Expand Down
2 changes: 1 addition & 1 deletion carcv-webapp/src/main/webapp/app/cartable.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<script>
function confirmRemove() {
var result = confirm("Are you sure you want to delete?");
if (result) { // TODO remove the correct entry!
if (result) { // TODO remove the correct entry! See issue #28
window.parent.location.replace("/admin/servlet/RemoveEntry?entry_id=${member.entryId}");
}
}
Expand Down

0 comments on commit 30578c2

Please sign in to comment.