diff options
author | Martin Stockhammer <m.stockhammer@web.de> | 2016-09-14 21:49:30 +0200 |
---|---|---|
committer | Martin Stockhammer <m.stockhammer@web.de> | 2016-09-14 21:49:30 +0200 |
commit | de3eb83242b42d75546670e8859cdb1f59fe4fa6 (patch) | |
tree | 047a0d2cebc7262b765a4e09eb7fc665d3948241 /archiva-modules/archiva-web/archiva-rest/archiva-rest-services | |
parent | d01764bed989abc53c20cb79723e59ae390f454a (diff) | |
download | archiva-de3eb83242b42d75546670e8859cdb1f59fe4fa6.tar.gz archiva-de3eb83242b42d75546670e8859cdb1f59fe4fa6.zip |
Adding restricted view for user managable repositories
Adds additional rest method to list the repositories where the user
has manage permissions.
Restricts the view for uploads to only managable repositories.
Diffstat (limited to 'archiva-modules/archiva-web/archiva-rest/archiva-rest-services')
-rw-r--r-- | archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java index 5e5a4654b..682c367bb 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java @@ -508,6 +508,19 @@ public class DefaultBrowseService } @Override + public List<ManagedRepository> getUserManagableRepositories() throws ArchivaRestServiceException { + try + { + return userRepositories.getManagableRepositories( getPrincipal() ); + } + catch ( ArchivaSecurityException e ) + { + throw new ArchivaRestServiceException( "repositories.read.managable.error", + Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), e ); + } + } + + @Override public List<Artifact> getDependees( String groupId, String artifactId, String version, String repositoryId ) throws ArchivaRestServiceException { |