From f3b625d298bab922c64192c25914e352bd87e59e Mon Sep 17 00:00:00 2001
From: John Crygier <john.crygier@aon.com>
Date: Tue, 10 Apr 2012 13:48:06 -0400
Subject: [PATCH] Rework LDAP implementation with unboundid. Also allows for an LDAP server to be started with Gitblit GO (backed by an LDIF file).
---
src/com/gitblit/SyndicationFilter.java | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/src/com/gitblit/SyndicationFilter.java b/src/com/gitblit/SyndicationFilter.java
index e042460..7e2561b 100644
--- a/src/com/gitblit/SyndicationFilter.java
+++ b/src/com/gitblit/SyndicationFilter.java
@@ -37,6 +37,9 @@
*/
@Override
protected String extractRepositoryName(String url) {
+ if (url.indexOf('?') > -1) {
+ return url.substring(0, url.indexOf('?'));
+ }
return url;
}
@@ -51,6 +54,18 @@
return "VIEW";
}
+ /**
+ * Determine if the action may be executed on the repository.
+ *
+ * @param repository
+ * @param action
+ * @return true if the action may be performed
+ */
+ @Override
+ protected boolean isActionAllowed(RepositoryModel repository, String action) {
+ return true;
+ }
+
/**
* Determine if the repository requires authentication.
*
@@ -73,7 +88,7 @@
*/
@Override
protected boolean canAccess(RepositoryModel repository, UserModel user, String action) {
- return user.canAccessRepository(repository.name);
+ return user.canAccessRepository(repository);
}
}
--
Gitblit v1.9.1