Older HTTP clients which do not speak the smart HTTP variant of the Git
protocol fetch from a repository by directly getting its objects and pack
files. This class, along with the http.getanyfile per-repository
configuration setting, can be used by
org. to control whether or not
these older clients are permitted to read these direct files.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| public static final AsIsFileService | DISABLED
Always throws |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | access(HttpServletRequest
current HTTP request, in case information from the request may
help determine the access request. req, Repository the repository the request would obtain a bare file from. db)Determine if access to any bare file of the repository is allowed. |
| protected static boolean | Returns: false if http.getanyfile was explicitly set to
false in the repository's configuration file; otherwise
true.the repository to check. db)Determine if |
| DISABLED | back to summary |
|---|---|
| public static final AsIsFileService DISABLED Always throws | |
| AsIsFileService | back to summary |
|---|---|
| public AsIsFileService() | |
| access | back to summary |
|---|---|
| public void access(HttpServletRequest req, Repository db) throws ServiceNotEnabledException, ServiceNotAuthorizedException Determine if access to any bare file of the repository is allowed. This method silently succeeds if the request is allowed, or fails by throwing a checked exception if access should be denied.
The default implementation of this method checks
| |
| isEnabled | back to summary |
|---|---|
| protected static boolean isEnabled(Repository db) Determine if
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| enabled | back to summary |
|---|---|
| pack-priv final boolean enabled | |
| ServiceConfig | back to summary |
|---|---|
| pack-priv ServiceConfig(Config cfg) | |