| | |
| | | * The DownloadZipFilter is an AccessRestrictionFilter which ensures that zip
|
| | | * requests for view-restricted repositories have proper authentication
|
| | | * credentials and are authorized.
|
| | | * |
| | | *
|
| | | * @author James Moger
|
| | | * |
| | | *
|
| | | */
|
| | | public class DownloadZipFilter extends AccessRestrictionFilter {
|
| | |
|
| | | /**
|
| | | * Extract the repository name from the url.
|
| | | * |
| | | *
|
| | | * @param url
|
| | | * @return repository name
|
| | | */
|
| | |
| | |
|
| | | /**
|
| | | * Analyze the url and returns the action of the request.
|
| | | * |
| | | *
|
| | | * @param url
|
| | | * @return action of the request
|
| | | */
|
| | |
| | |
|
| | | /**
|
| | | * Determine if a non-existing repository can be created using this filter.
|
| | | * |
| | | *
|
| | | * @return true if the filter allows repository creation
|
| | | */
|
| | | @Override
|
| | |
| | |
|
| | | /**
|
| | | * Determine if the action may be executed on the repository.
|
| | | * |
| | | *
|
| | | * @param repository
|
| | | * @param action
|
| | | * @return true if the action may be performed
|
| | |
| | |
|
| | | /**
|
| | | * Determine if the repository requires authentication.
|
| | | * |
| | | *
|
| | | * @param repository
|
| | | * @param action
|
| | | * @return true if authentication required
|
| | |
| | | /**
|
| | | * Determine if the user can access the repository and perform the specified
|
| | | * action.
|
| | | * |
| | | *
|
| | | * @param repository
|
| | | * @param user
|
| | | * @param action
|