1 package org.cacert.gigi.pages.admin.support;
3 import java.io.IOException;
5 import javax.servlet.http.HttpServletRequest;
6 import javax.servlet.http.HttpServletResponse;
8 import org.cacert.gigi.dbObjects.Group;
9 import org.cacert.gigi.dbObjects.User;
10 import org.cacert.gigi.pages.Page;
11 import org.cacert.gigi.util.AuthorizationContext;
13 public class SupportUserHistory extends Page {
15 public static final String PATH = "/support/user/*/history";
17 private static final int intStart = PATH.indexOf('*');
19 public SupportUserHistory() {
20 super("Support user history");
24 public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
25 String info = req.getPathInfo();
26 int id = Integer.parseInt(info.substring(intStart, info.length() - PATH.length() + intStart + 1));
27 User u = User.getById(id);
36 public boolean isPermitted(AuthorizationContext ac) {
37 return ac != null && ac.isInGroup(Group.SUPPORTER);