| | |
| | | import java.io.IOException;
|
| | | import java.text.MessageFormat;
|
| | |
|
| | | import javax.inject.Inject;
|
| | | import javax.inject.Singleton;
|
| | | import javax.servlet.FilterChain;
|
| | | import javax.servlet.ServletException;
|
| | | import javax.servlet.ServletRequest;
|
| | |
| | |
|
| | | import com.gitblit.Constants.RpcRequest;
|
| | | import com.gitblit.manager.IRuntimeManager;
|
| | | import com.gitblit.manager.ISessionManager;
|
| | | import com.gitblit.models.UserModel;
|
| | |
|
| | | /**
|
| | |
| | | * @author James Moger
|
| | | *
|
| | | */
|
| | | @Singleton
|
| | | public class RpcFilter extends AuthenticationFilter {
|
| | |
|
| | | private final IStoredSettings settings;
|
| | |
|
| | | private final IRuntimeManager runtimeManager;
|
| | |
|
| | | @Inject
|
| | | public RpcFilter(
|
| | | IRuntimeManager runtimeManager,
|
| | | ISessionManager sessionManager) {
|
| | |
|
| | | super(sessionManager);
|
| | | this.settings = runtimeManager.getSettings();
|
| | | this.runtimeManager = runtimeManager;
|
| | | }
|
| | |
|
| | | /**
|
| | | * doFilter does the actual work of preprocessing the request to ensure that
|
| | |
| | | httpResponse.sendError(HttpServletResponse.SC_NOT_IMPLEMENTED);
|
| | | return;
|
| | | }
|
| | |
|
| | | IRuntimeManager runtimeManager = GitBlit.getManager(IRuntimeManager.class);
|
| | | IStoredSettings settings = runtimeManager.getSettings();
|
| | |
|
| | | boolean adminRequest = requestType.exceeds(RpcRequest.LIST_SETTINGS);
|
| | |
|