| | |
| | | */
|
| | | @Override
|
| | | protected String extractRepositoryName(String url) {
|
| | | if (url.indexOf('?') > -1) {
|
| | | return url.substring(0, url.indexOf('?'));
|
| | | }
|
| | | return url;
|
| | | }
|
| | |
|
| | |
| | | return "VIEW";
|
| | | }
|
| | |
|
| | | /**
|
| | | * Determine if the action may be executed on the repository.
|
| | | * |
| | | * @param repository
|
| | | * @param action
|
| | | * @return true if the action may be performed
|
| | | */
|
| | | @Override
|
| | | protected boolean isActionAllowed(RepositoryModel repository, String action) {
|
| | | return true;
|
| | | }
|
| | | |
| | | /**
|
| | | * Determine if the repository requires authentication.
|
| | | *
|
| | |
| | | */
|
| | | @Override
|
| | | protected boolean canAccess(RepositoryModel repository, UserModel user, String action) {
|
| | | return user.canAccessRepository(repository.name);
|
| | | return user.canAccessRepository(repository);
|
| | | }
|
| | |
|
| | | }
|