summaryrefslogtreecommitdiffstats
path: root/src/com/gitblit/client/GitblitClient.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2012-06-06 17:00:21 -0400
committerJames Moger <james.moger@gitblit.com>2012-06-06 17:00:21 -0400
commit94dcbd617f3d06ca294d5d151390698e4bddd2cc (patch)
treecd69a6c5a77ed34e8ec26e456fd75acc0b859f6d /src/com/gitblit/client/GitblitClient.java
parent3f8cd414769b513a5b0815e0da21f19fe4b1f2d8 (diff)
downloadgitblit-94dcbd617f3d06ca294d5d151390698e4bddd2cc.tar.gz
gitblit-94dcbd617f3d06ca294d5d151390698e4bddd2cc.zip
Implemented default access restriction (issue 88)
Diffstat (limited to 'src/com/gitblit/client/GitblitClient.java')
-rw-r--r--src/com/gitblit/client/GitblitClient.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/com/gitblit/client/GitblitClient.java b/src/com/gitblit/client/GitblitClient.java
index 09bcaab9..ed5a1337 100644
--- a/src/com/gitblit/client/GitblitClient.java
+++ b/src/com/gitblit/client/GitblitClient.java
@@ -28,6 +28,7 @@ import java.util.Set;
import java.util.TreeSet;
import com.gitblit.Constants;
+import com.gitblit.Constants.AccessRestrictionType;
import com.gitblit.GitBlitException.ForbiddenException;
import com.gitblit.GitBlitException.NotAllowedException;
import com.gitblit.GitBlitException.UnauthorizedException;
@@ -185,6 +186,14 @@ public class GitblitClient implements Serializable {
return sb.toString();
}
}
+
+ public AccessRestrictionType getDefaultAccessRestriction() {
+ String restriction = null;
+ if (settings.hasKey(Keys.git.defaultAccessRestriction)) {
+ restriction = settings.get(Keys.git.defaultAccessRestriction).currentValue;
+ }
+ return AccessRestrictionType.fromName(restriction);
+ }
/**
* Returns the list of pre-receive scripts the repository inherited from the