diff options
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/gitblit/git/GitblitReceivePack.java | 2 | ||||
-rw-r--r-- | src/main/java/com/gitblit/servlet/RpcFilter.java | 8 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/main/java/com/gitblit/git/GitblitReceivePack.java b/src/main/java/com/gitblit/git/GitblitReceivePack.java index 11b1bda8..95d17fa5 100644 --- a/src/main/java/com/gitblit/git/GitblitReceivePack.java +++ b/src/main/java/com/gitblit/git/GitblitReceivePack.java @@ -103,7 +103,7 @@ public class GitblitReceivePack extends ReceivePack implements PreReceiveHook, P this.settings = gitblit.getSettings();
this.gitblit = gitblit;
this.repository = repository;
- this.user = user == null ? UserModel.ANONYMOUS : user;
+ this.user = user;
this.groovyDir = gitblit.getHooksFolder();
try {
// set Grape root
diff --git a/src/main/java/com/gitblit/servlet/RpcFilter.java b/src/main/java/com/gitblit/servlet/RpcFilter.java index 02f419ff..6163252d 100644 --- a/src/main/java/com/gitblit/servlet/RpcFilter.java +++ b/src/main/java/com/gitblit/servlet/RpcFilter.java @@ -27,11 +27,9 @@ import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import com.gitblit.Constants;
+import com.gitblit.Constants.RpcRequest;
import com.gitblit.IStoredSettings;
import com.gitblit.Keys;
-import com.gitblit.Constants.RpcRequest;
-import com.gitblit.Keys.web;
import com.gitblit.manager.IRuntimeManager;
import com.gitblit.manager.ISessionManager;
import com.gitblit.models.UserModel;
@@ -138,10 +136,8 @@ public class RpcFilter extends AuthenticationFilter { return;
}
// valid user, but not for requested access. send 403.
- if (runtimeManager.isDebugMode()) {
- logger.info(MessageFormat.format("RPC: {0} forbidden to access {1}",
+ logger.warn(MessageFormat.format("RPC: {0} forbidden to access {1}",
user.username, fullUrl));
- }
httpResponse.sendError(HttpServletResponse.SC_FORBIDDEN);
return;
}
|