| | |
| | |
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | public static final int PROTOCOL_VERSION = 2;
|
| | | public static final int PROTOCOL_VERSION = 4;
|
| | |
|
| | | public RpcServlet() {
|
| | | super();
|
| | |
| | |
|
| | | UserModel user = (UserModel) request.getUserPrincipal();
|
| | |
|
| | | boolean allowManagement = user != null && user.canAdmin
|
| | | boolean allowManagement = user != null && user.canAdmin()
|
| | | && GitBlit.getBoolean(Keys.web.enableRpcManagement, false);
|
| | |
|
| | | boolean allowAdmin = user != null && user.canAdmin
|
| | | boolean allowAdmin = user != null && user.canAdmin()
|
| | | && GitBlit.getBoolean(Keys.web.enableRpcAdministration, false);
|
| | |
|
| | | Object result = null;
|
| | |
| | | } else {
|
| | | response.sendError(notAllowedCode);
|
| | | }
|
| | | } else if (RpcRequest.CLEAR_REPOSITORY_CACHE.equals(reqType)) {
|
| | | // clear the repository list cache
|
| | | if (allowManagement) {
|
| | | GitBlit.self().resetRepositoryListCache();
|
| | | } else {
|
| | | response.sendError(notAllowedCode);
|
| | | }
|
| | | }
|
| | |
|
| | | // send the result of the request
|