- Set Link: <url>; rel="canonical" http header for SEO (issue-304)
- Added raw links to the commit, commitdiff, and compare pages (issue-319)
- Support intradocument linking in Markdown content using [[WikiLinks]] syntax (issue-324)
+ - Added filesystem write permission check (issue-345)
- Support rendering confluence, mediawiki, textile, tracwiki, and twiki markup documents
- Added setting to globally disable anonymous pushes in the receive pack
- Added a normalized diffstat display to the commit, commitdiff, and compare pages
\r
public static final String BRANCH_GRAPH_PATH = "/graph/";\r
\r
- public static final String BORDER = "***********************************************************";\r
+ public static final String BORDER = "*****************************************************************";\r
+\r
+ public static final String BORDER2 = "#################################################################";\r
\r
public static final String FEDERATION_USER = "$gitblit";\r
\r
String realm = settings.getString(Keys.realm.userService, "${baseFolder}/users.conf");
if (legacyRedirects.containsKey(realm)) {
logger.warn("");
- logger.warn("#################################################################");
+ logger.warn(Constants.BORDER2);
logger.warn(" IUserService '{}' is obsolete!", realm);
logger.warn(" Please set '{}={}'", "realm.authenticationProviders", legacyRedirects.get(realm));
- logger.warn("#################################################################");
+ logger.warn(Constants.BORDER2);
logger.warn("");
// conditionally override specified authentication providers
configureJGit();
configureCommitCache();
+ confirmWriteAccess();
+
return this;
}
daysToCache, commitCount, repoCount, TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - start)));
}
}
+
+ protected void confirmWriteAccess() {
+ if (runtimeManager.isServingRepositories()) {
+ try {
+ File file = File.createTempFile(".test-", ".txt", getRepositoriesFolder());
+ file.delete();
+ } catch (Exception e) {
+ logger.error("");
+ logger.error(Constants.BORDER2);
+ logger.error("Please check filesystem permissions!");
+ logger.error("FAILED TO WRITE TO REPOSITORIES FOLDER!!", e);
+ logger.error(Constants.BORDER2);
+ logger.error("");
+ }
+ }
+ }
}
// create the user service from the legacy config
String realmKey = legacyBackingServices.get(realm);
logger.warn("");
- logger.warn("#################################################################");
+ logger.warn(Constants.BORDER2);
logger.warn(" Key '{}' is obsolete!", realmKey);
logger.warn(" Please set '{}={}'", Keys.realm.userService, settings.getString(realmKey, "${baseFolder}/users.conf"));
- logger.warn("#################################################################");
+ logger.warn(Constants.BORDER2);
logger.warn("");
File realmFile = runtimeManager.getFileOrFolder(realmKey, "${baseFolder}/users.conf");
service = createUserService(realmFile);