X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;ds=sidebyside;f=src%2Forg%2Fcacert%2Fgigi%2Fpages%2Fwot%2FMyPoints.java;h=ba2bdf5af5da706d62f91b01dae4b52114741a15;hb=3689dcd11a286c3c9204f96d9a6c3b33a968844a;hp=ffe68986b85fd6b46a3d1d18fac444cdd2a36911;hpb=3e123160ad59a2e1162518923965562ff947b6d1;p=gigi.git diff --git a/src/org/cacert/gigi/pages/wot/MyPoints.java b/src/org/cacert/gigi/pages/wot/MyPoints.java index ffe68986..ba2bdf5a 100644 --- a/src/org/cacert/gigi/pages/wot/MyPoints.java +++ b/src/org/cacert/gigi/pages/wot/MyPoints.java @@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletResponse; import org.cacert.gigi.dbObjects.User; import org.cacert.gigi.output.AssurancesDisplay; import org.cacert.gigi.pages.Page; +import org.cacert.gigi.util.AuthorizationContext; public class MyPoints extends Page { @@ -30,7 +31,16 @@ public class MyPoints extends Page { User user = getUser(req); vars.put("asArr", user.getReceivedAssurances()); vars.put("otherAsArr", user.getMadeAssurances()); + vars.put("assP", user.getAssurancePoints()); + if (user.canAssure()) { + vars.put("expP", user.getExperiencePoints()); + vars.put("maxP", user.getMaxAssurePoints()); + } getDefaultTemplate().output(resp.getWriter(), getLanguage(req), vars); } + @Override + public boolean isPermitted(AuthorizationContext ac) { + return ac != null && ac.getTarget() instanceof User; + } }