* @return true if the repository exists\r
*/\r
public boolean hasRepository(String repositoryName) {\r
- if (settings.getBoolean(Keys.git.cacheRepositoryList, true)) {\r
+ return hasRepository(repositoryName, false);\r
+ }\r
+ \r
+ /**\r
+ * Determines if this server has the requested repository.\r
+ * \r
+ * @param name\r
+ * @param caseInsensitive\r
+ * @return true if the repository exists\r
+ */\r
+ public boolean hasRepository(String repositoryName, boolean caseSensitiveCheck) {\r
+ if (!caseSensitiveCheck && settings.getBoolean(Keys.git.cacheRepositoryList, true)) {\r
// if we are caching use the cache to determine availability\r
// otherwise we end up adding a phantom repository to the cache\r
return repositoryListCache.containsKey(repositoryName.toLowerCase());\r
RepositoryModel model = GitBlit.self().getRepositoryModel(\r
GitBlitWebSession.get().getUser(), repositoryName);\r
if (model == null) {\r
- if (GitBlit.self().hasRepository(repositoryName)) {\r
+ if (GitBlit.self().hasRepository(repositoryName, true)) {\r
// has repository, but unauthorized\r
authenticationError(getString("gb.unauthorizedAccessForRepository") + " " + repositoryName);\r
} else {\r