|
|
@@ -101,11 +101,13 @@ public class GitFilter extends AccessRestrictionFilter { |
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
protected boolean isActionAllowed(RepositoryModel repository, String action) {
|
|
|
|
if (action.equals(gitReceivePack)) {
|
|
|
|
// Push request
|
|
|
|
if (!repository.isBare) {
|
|
|
|
logger.warn("Gitblit does not allow pushes to repositories with a working copy");
|
|
|
|
return false;
|
|
|
|
if (!StringUtils.isEmpty(action)) {
|
|
|
|
if (action.equals(gitReceivePack)) {
|
|
|
|
// Push request
|
|
|
|
if (!repository.isBare) {
|
|
|
|
logger.warn("Gitblit does not allow pushes to repositories with a working copy");
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|