From 8a2e9c363346ef5bf48c8eba09cb8afa46fabeeb Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Tue, 24 May 2011 17:17:51 -0400
Subject: [PATCH] Delete/Rename repos & user. Edit link. Dropped crypt. Other git urls.
---
src/com/gitblit/Constants.java | 32 +++++++++++++++++---------------
1 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/src/com/gitblit/Constants.java b/src/com/gitblit/Constants.java
index 3ca917d..46f3208 100644
--- a/src/com/gitblit/Constants.java
+++ b/src/com/gitblit/Constants.java
@@ -3,8 +3,16 @@
public class Constants {
public final static String NAME = "Git:Blit";
+
+ public final static String FULL_NAME = "Git:Blit - a Pure Java Git Solution";
+ // 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 final static String VERSION = "0.1.0-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.
+ public final static String JGIT_VERSION = "JGit 0.12.1";
public final static String ADMIN_ROLE = "#admin";
@@ -13,31 +21,25 @@
public static enum AccessRestrictionType {
NONE, PUSH, CLONE, VIEW;
- public static AccessRestrictionType fromString(String name) {
+ public static AccessRestrictionType fromName(String name) {
for (AccessRestrictionType type : values()) {
- if (type.toString().equalsIgnoreCase(name)) {
+ if (type.name().equalsIgnoreCase(name)) {
return type;
}
}
return NONE;
}
-
+
+ public boolean exceeds(AccessRestrictionType type) {
+ return this.ordinal() > type.ordinal();
+ }
+
public boolean atLeast(AccessRestrictionType type) {
return this.ordinal() >= type.ordinal();
}
public String toString() {
- switch (this) {
- case NONE:
- return "none";
- case PUSH:
- return "push";
- case CLONE:
- return "clone";
- case VIEW:
- return "view";
- }
- return "none";
+ return name();
}
}
@@ -46,7 +48,7 @@
}
public static String getJGitVersion() {
- return "JGit 0.12.1";
+ return JGIT_VERSION;
}
public static String getRunningVersion() {
--
Gitblit v1.9.1