Add purge flag.

This commit is contained in:
Paulo Gustavo Veiga 2013-03-24 15:42:25 -03:00
parent 45c67d6b57
commit 580d977aa9
2 changed files with 2 additions and 1 deletions

View File

@ -128,8 +128,8 @@ public class AdminController extends BaseController {
userService.deleteUser(user);
}
@RequestMapping(method = RequestMethod.GET, value = "admin/database/purge")
@ResponseStatus(value = HttpStatus.NO_CONTENT)
@RequestMapping(method = RequestMethod.GET, value = "admin/database/purge")
public void purgeDB(@RequestParam(required = true) Integer muid, @RequestParam(required = true) Boolean apply) throws UnsupportedEncodingException, WiseMappingException {
for (int i = 0; i < muid; i++) {

View File

@ -37,6 +37,7 @@
<sec:http use-expressions="true" create-session="stateless" pattern="/service/**">
<sec:intercept-url pattern="/service/admin/users/**" access="isAuthenticated() and hasRole('ROLE_ADMIN')"/>
<sec:intercept-url pattern="/service/admin/database/**" access="isAuthenticated() and hasRole('ROLE_ADMIN')"/>
<sec:intercept-url pattern="/service/**" access="isAuthenticated() and hasRole('ROLE_USER')"/>
<sec:http-basic/>
</sec:http>