return;\r
} else {\r
// check user access for request\r
- if (user.canAdmin() || canAccess(user, requestType)) {\r
+ if (user.canAdmin() || !adminRequest) {\r
// authenticated request permitted.\r
// pass processing to the restricted servlet.\r
newSession(authenticatedRequest, httpResponse);\r
// pass processing to the restricted servlet.\r
chain.doFilter(authenticatedRequest, httpResponse);\r
}\r
-\r
- private boolean canAccess(UserModel user, RpcRequest requestType) {\r
- switch (requestType) {\r
- case GET_PROTOCOL:\r
- return true;\r
- case LIST_REPOSITORIES:\r
- return true;\r
- default:\r
- return user.canAdmin();\r
- }\r
- }\r
-}
\ No newline at end of file
+}\r