summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-rest/archiva-rest-services
diff options
context:
space:
mode:
authorMartin Stockhammer <m.stockhammer@web.de>2016-09-14 21:49:30 +0200
committerMartin Stockhammer <m.stockhammer@web.de>2016-09-14 21:49:30 +0200
commitde3eb83242b42d75546670e8859cdb1f59fe4fa6 (patch)
tree047a0d2cebc7262b765a4e09eb7fc665d3948241 /archiva-modules/archiva-web/archiva-rest/archiva-rest-services
parentd01764bed989abc53c20cb79723e59ae390f454a (diff)
downloadarchiva-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.java13
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
{