summaryrefslogtreecommitdiffstats
path: root/src/main/java/com
diff options
context:
space:
mode:
authorJoel Johnson <joel.johnson@issinc.com>2015-06-12 17:46:31 -0600
committerJoel Johnson <joel.johnson@issinc.com>2015-06-12 17:46:31 -0600
commitc20191fc0931a19bec0df1ab2b56f287e5d8b7c7 (patch)
tree1e2a532d393b3d22b9828989fe2f7fe92ff281d1 /src/main/java/com
parentf3b7e29b210bba61c64ba9aee07cf2eef20ea5f4 (diff)
downloadgitblit-c20191fc0931a19bec0df1ab2b56f287e5d8b7c7.tar.gz
gitblit-c20191fc0931a19bec0df1ab2b56f287e5d8b7c7.zip
allow configuring of internal URLs offered
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/gitblit/manager/ServicesManager.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/com/gitblit/manager/ServicesManager.java b/src/main/java/com/gitblit/manager/ServicesManager.java
index 69e5e408..5a957a17 100644
--- a/src/main/java/com/gitblit/manager/ServicesManager.java
+++ b/src/main/java/com/gitblit/manager/ServicesManager.java
@@ -162,7 +162,8 @@ public class ServicesManager implements IServicesManager {
List<RepositoryUrl> list = new ArrayList<RepositoryUrl>();
// http/https url
- if (settings.getBoolean(Keys.git.enableGitServlet, true)) {
+ if (settings.getBoolean(Keys.git.enableGitServlet, true) &&
+ settings.getBoolean(Keys.web.showHttpServletUrls, true)) {
AccessPermission permission = user.getRepositoryPermission(repository).permission;
if (permission.exceeds(AccessPermission.NONE)) {
Transport transport = Transport.fromString(request.getScheme());
@@ -177,7 +178,8 @@ public class ServicesManager implements IServicesManager {
// ssh daemon url
String sshDaemonUrl = getSshDaemonUrl(request, user, repository);
- if (!StringUtils.isEmpty(sshDaemonUrl)) {
+ if (!StringUtils.isEmpty(sshDaemonUrl) &&
+ settings.getBoolean(Keys.web.showSshDaemonUrls, true)) {
AccessPermission permission = user.getRepositoryPermission(repository).permission;
if (permission.exceeds(AccessPermission.NONE)) {
if (permission.atLeast(AccessPermission.PUSH) && !acceptsPush(Transport.SSH)) {
@@ -192,7 +194,8 @@ public class ServicesManager implements IServicesManager {
// git daemon url
String gitDaemonUrl = getGitDaemonUrl(request, user, repository);
- if (!StringUtils.isEmpty(gitDaemonUrl)) {
+ if (!StringUtils.isEmpty(gitDaemonUrl) &&
+ settings.getBoolean(Keys.web.showGitDaemonUrls, true)) {
AccessPermission permission = getGitDaemonAccessPermission(user, repository);
if (permission.exceeds(AccessPermission.NONE)) {
if (permission.atLeast(AccessPermission.PUSH) && !acceptsPush(Transport.GIT)) {