From 45e7d914f3519882c63f60eafd9f746b2d56d967 Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Fri, 10 Aug 2012 16:12:51 -0400 Subject: [PATCH] Encode as UTF-8 --- src/com/gitblit/Constants.java | 26 ++++++++++++++++++++++++-- 1 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/com/gitblit/Constants.java b/src/com/gitblit/Constants.java index 772c768..181fb8f 100644 --- a/src/com/gitblit/Constants.java +++ b/src/com/gitblit/Constants.java @@ -30,7 +30,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 VERSION = "1.0.0-SNAPSHOT"; + public static final String VERSION = "1.0.1-SNAPSHOT"; // The build script extracts this exact line so be careful editing it // and only use A-Z a-z 0-9 .-_ in the string. @@ -38,7 +38,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.3.0 (201202151440-r)"; + public static final String JGIT_VERSION = "JGit 2.0.0 (201206130900-r)"; public static final String ADMIN_ROLE = "#admin"; @@ -109,6 +109,28 @@ return name(); } } + + /** + * Enumeration representing the types of authorization control for an + * access restricted resource. + */ + public static enum AuthorizationControl { + AUTHENTICATED, NAMED; + + public static AuthorizationControl fromName(String name) { + for (AuthorizationControl type : values()) { + if (type.name().equalsIgnoreCase(name)) { + return type; + } + } + return NAMED; + } + + public String toString() { + return name(); + } + } + /** * Enumeration representing the types of federation tokens. -- Gitblit v1.9.1