From 5e43f65d95b7e68a7ed90fe17be4594f4d974f4e Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Sun, 25 Mar 2012 20:31:19 -0400
Subject: [PATCH] Do not include servlet jar in WAR build
---
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