Commit de55d192 authored by Matija Obreza's avatar Matija Obreza

Admin actions should be in /admin (security is configured to manage this prefix)

parent d9b61d59
......@@ -23,7 +23,7 @@ import java.util.List;
import java.util.Set;
@Controller
@RequestMapping("/cache")
@RequestMapping("/admin/cache")
@PreAuthorize("hasRole('ADMINISTRATOR')")
public class CacheController {
......
package org.genesys2.server.servlet.controller.admin;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Enumeration;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.log4j.Level;
......@@ -15,10 +21,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.*;
@Controller
@RequestMapping("/logger")
@RequestMapping("/admin/logger")
@PreAuthorize("hasRole('ADMINISTRATOR')")
public class LoggerController {
......
......@@ -32,7 +32,7 @@
<div class="change-level-label">Change level</div>
<form method="post" class="form-change-level form-inline" action=<c:url value="/logger/changeLoger"/> >
<form method="post" class="form-change-level form-inline" action=<c:url value="/admin/logger/changeLoger"/> >
<input type="hidden" name="loggerName" value="${logger.name}"/>
......@@ -54,7 +54,7 @@
</div>
<div class="form-group">
<a class="btn btn-default" href="<c:url value="/logger/adjustLogger" />">Cancel</a>
<a class="btn btn-default" href="<c:url value="/admin/logger/adjustLogger" />">Cancel</a>
</div>
</form>
......
......@@ -24,7 +24,7 @@
<div class="change-level-label">Add logger</div>
<form method="post" class="form-change-level form-inline" action=<c:url value="/logger/addLoger"/> >
<form method="post" class="form-change-level form-inline" action=<c:url value="/admin/logger/addLoger"/> >
<div class="form-group col-sm-3">
<input class="form-control" type="text" name="nameNewLogger" placeholder="com.example.package.Class"/>
......@@ -49,7 +49,7 @@
<tbody>
<c:forEach items="${loggers}" var="logger" varStatus="status">
<tr class="${status.count % 2 == 0 ? 'even' : 'odd'} particular-logger">
<td><a class="adjust-logger-config" href="<c:url value="/logger/adjustLoggerPage/${logger.name}." />">${logger.name}</a></td>
<td><a class="adjust-logger-config" href="<c:url value="/admin/logger/adjustLoggerPage/${logger.name}." />">${logger.name}</a></td>
</tr>
</c:forEach>
</tbody>
......
......@@ -12,7 +12,7 @@
<spring:message code="admin.cache.page.title" />
</h1>
<form method="post" action="<c:url value="/cache/clearCaches" />">
<form method="post" action="<c:url value="/admin/cache/clearCaches" />">
<input type="submit" class="btn btn-default" value="Clear all caches" />
<!-- CSRF protection -->
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
......
......@@ -13,7 +13,7 @@
</h1>
<h3>Full-text Search</h3>
<form method="post" action="<c:url value="/cache/clearTilesCache" />">
<form method="post" action="<c:url value="/admin/cache/clearTilesCache" />">
<input type="submit" class="btn btn-default" value="Clear Tiles cache" />
<!-- CSRF protection -->
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
......@@ -127,7 +127,7 @@
</form>
<div class="adjust-logger-block">
<a class="btn btn-default" href="<c:url value="/logger/adjustLogger" />">Adjust logger</a>
<a class="btn btn-default" href="<c:url value="/admin/logger/adjustLogger" />">Adjust logger</a>
</div>
</body>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment