| | |
| | | user.username, httpRequest.getRemoteAddr())); |
| | | return user; |
| | | } else { |
| | | logger.warn(MessageFormat.format("Failed login attempt for {0}, invalid credentials ({1}) from {2}", |
| | | username, credentials, httpRequest.getRemoteAddr())); |
| | | logger.warn(MessageFormat.format("Failed login attempt for {0}, invalid credentials from {1}", |
| | | username, httpRequest.getRemoteAddr())); |
| | | } |
| | | } |
| | | } |
| | |
| | | model.incrementalPushTagPrefix = getConfig(config, "incrementalPushTagPrefix", null); |
| | | model.allowForks = getConfig(config, "allowForks", true); |
| | | model.accessRestriction = AccessRestrictionType.fromName(getConfig(config, |
| | | "accessRestriction", settings.getString(Keys.git.defaultAccessRestriction, null))); |
| | | "accessRestriction", settings.getString(Keys.git.defaultAccessRestriction, "PUSH"))); |
| | | model.authorizationControl = AuthorizationControl.fromName(getConfig(config, |
| | | "authorizationControl", settings.getString(Keys.git.defaultAuthorizationControl, null))); |
| | | model.verifyCommitter = getConfig(config, "verifyCommitter", false); |
| | |
| | | } |
| | | } |
| | | |
| | | // Adjust permissions in case we updated the config files |
| | | JGitUtils.adjustSharedPerm(new File(r.getDirectory().getAbsolutePath(), "config"), |
| | | getString(Keys.git.createRepositoriesShared, "FALSE")); |
| | | JGitUtils.adjustSharedPerm(new File(r.getDirectory().getAbsolutePath(), "HEAD"), |
| | | getString(Keys.git.createRepositoriesShared, "FALSE")); |
| | | |
| | | // close the repository object |
| | | r.close(); |
| | | } |
| | | |
| | | // Adjust permissions in case we updated the config files |
| | | JGitUtils.adjustSharedPerm(new File(r.getDirectory().getAbsolutePath(), "config"), |
| | | getString(Keys.git.createRepositoriesShared, "FALSE")); |
| | | JGitUtils.adjustSharedPerm(new File(r.getDirectory().getAbsolutePath(), "HEAD"), |
| | | getString(Keys.git.createRepositoriesShared, "FALSE")); |
| | | |
| | | // update repository cache |
| | | removeFromCachedRepositoryList(repositoryName); |