public class DefaultReceivePackFactory extends java.lang.Object implements ReceivePackFactory<javax.servlet.http.HttpServletRequest>
ReceivePack service
instance.
Writing by receive-pack is permitted if any of the following is true:
HttpServletRequest.getRemoteUser() to the
authenticated name.
http.receivepack explicitly
set to true.
| Modifier and Type | Class and Description |
|---|---|
private static class |
DefaultReceivePackFactory.ServiceConfig |
DISABLED| Constructor and Description |
|---|
DefaultReceivePackFactory() |
| Modifier and Type | Method and Description |
|---|---|
ReceivePack |
create(javax.servlet.http.HttpServletRequest req,
Repository db)
Create and configure a new ReceivePack instance for a repository.
|
private static ReceivePack |
createFor(javax.servlet.http.HttpServletRequest req,
Repository db,
java.lang.String user) |
private static PersonIdent |
toPersonIdent(javax.servlet.http.HttpServletRequest req,
java.lang.String user) |
public ReceivePack create(javax.servlet.http.HttpServletRequest req, Repository db) throws ServiceNotEnabledException, ServiceNotAuthorizedException
create in interface ReceivePackFactory<javax.servlet.http.HttpServletRequest>req - current request, in case information from the request may help
configure the ReceivePack instance.db - the repository the receive would write into.ServiceNotEnabledException - this factory refuses to create the instance because it is not
allowed on the target repository, by any user.ServiceNotAuthorizedException - this factory refuses to create the instance for this HTTP
request and repository, such as due to a permission error.private static ReceivePack createFor(javax.servlet.http.HttpServletRequest req, Repository db, java.lang.String user)
private static PersonIdent toPersonIdent(javax.servlet.http.HttpServletRequest req, java.lang.String user)