From 78753bc22f140f863aa3fe56b1c59699ca3e2fa8 Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Mon, 26 Sep 2011 22:29:07 -0400 Subject: [PATCH] Protect DownloadZipServlet with an AccessRestrictionFilter. --- src/com/gitblit/Constants.java | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/com/gitblit/Constants.java b/src/com/gitblit/Constants.java index a58242b..b52f055 100644 --- a/src/com/gitblit/Constants.java +++ b/src/com/gitblit/Constants.java @@ -37,7 +37,7 @@ // The build script extracts this exact line so be careful editing it // and only use A-Z a-z 0-9 .-_ in the string. - public static final String JGIT_VERSION = "JGit 1.0.0 (201106090707-r)"; + public static final String JGIT_VERSION = "JGit 1.1.0 (201109151100-r)"; public static final String ADMIN_ROLE = "#admin"; @@ -135,7 +135,7 @@ * Enumeration representing the statii of federation requests. */ public static enum FederationPullStatus { - PENDING, FAILED, SKIPPED, PULLED, EXCLUDED; + PENDING, FAILED, SKIPPED, PULLED, MIRRORED, NOCHANGE, EXCLUDED; public static FederationPullStatus fromName(String name) { for (FederationPullStatus type : values()) { @@ -151,7 +151,7 @@ return name(); } } - + /** * Enumeration representing the federation types. */ @@ -167,6 +167,14 @@ return FEDERATE_THIS; } + public boolean exceeds(FederationStrategy type) { + return this.ordinal() > type.ordinal(); + } + + public boolean atLeast(FederationStrategy type) { + return this.ordinal() >= type.ordinal(); + } + @Override public String toString() { return name(); -- Gitblit v1.9.1