aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2020-09-09 12:51:02 +0200
committerMartin Stockhammer <martin_s@apache.org>2020-09-09 12:51:02 +0200
commit61a94c93a5f307dfa40713691f128de82cc434cc (patch)
tree723ff86cb91484194fb2e3dc4aae27ab12236b82 /archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src
parent780886fcdc840e818198d108bbaa876a442e27e1 (diff)
downloadarchiva-61a94c93a5f307dfa40713691f128de82cc434cc.tar.gz
archiva-61a94c93a5f307dfa40713691f128de82cc434cc.zip
Adapting for the privilege change regarding resource annotations in redback.
Diffstat (limited to 'archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src')
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/BrowseService.java6
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/MergeRepositoriesService.java4
2 files changed, 5 insertions, 5 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/BrowseService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/BrowseService.java
index c957c14fc..b59747c31 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/BrowseService.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/BrowseService.java
@@ -149,7 +149,7 @@ public interface BrowseService
@Path("metadata/{g}/{a}/{v}/{key}/{value}")
@PUT
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @RedbackAuthorization(noPermission = false, noRestriction = false, permissions = "archiva-add-metadata")
+ @RedbackAuthorization( permissions = "archiva-add-metadata", resource = "{repositoryId}")
ActionStatus addMetadata( @PathParam("g") String groupId, @PathParam("a") String artifactId,
@PathParam("v") String version, @PathParam("key") String key, @PathParam("value") String value,
@QueryParam("repositoryId") String repositoryId )
@@ -158,7 +158,7 @@ public interface BrowseService
@Path("metadata/{g}/{a}/{v}/{key}")
@DELETE
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @RedbackAuthorization(noPermission = false, noRestriction = false, permissions = "archiva-add-metadata")
+ @RedbackAuthorization( permissions = "archiva-add-metadata", resource = "{repositoryId}")
ActionStatus deleteMetadata( @PathParam("g") String groupId, @PathParam("a") String artifactId,
@PathParam("v") String version, @PathParam("key") String key,
@QueryParam("repositoryId") String repositoryId )
@@ -166,7 +166,7 @@ public interface BrowseService
@Path("importMetadata")
@POST
- @RedbackAuthorization(noPermission = false, noRestriction = false, permissions = "archiva-add-metadata")
+ @RedbackAuthorization( permissions = "archiva-add-metadata", resource = "{repository}")
ActionStatus importMetadata( MetadataAddRequest metadataAddRequest, @QueryParam("repository") String repository )
throws ArchivaRestServiceException;
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/MergeRepositoriesService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/MergeRepositoriesService.java
index 0d38133ba..9c83812b2 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/MergeRepositoriesService.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/MergeRepositoriesService.java
@@ -48,7 +48,7 @@ public interface MergeRepositoriesService
@Path ("mergeConflictedArtifacts/{sourceRepositoryId}/{targetRepositoryId}")
@GET
@Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @RedbackAuthorization (permissions = ArchivaRoleConstants.OPERATION_MERGE_REPOSITORY)
+ @RedbackAuthorization (permissions = ArchivaRoleConstants.OPERATION_MERGE_REPOSITORY, resource = "{sourceRepositoryId}")
List<Artifact> getMergeConflictedArtifacts( @PathParam ("sourceRepositoryId") String sourceRepositoryId,
@PathParam ("targetRepositoryId") String targetRepositoryId )
throws ArchivaRestServiceException;
@@ -59,7 +59,7 @@ public interface MergeRepositoriesService
*/
@Path ("mergeRepositories/{sourceRepositoryId}/{targetRepositoryId}/{skipConflicts}")
@GET
- @RedbackAuthorization (permissions = ArchivaRoleConstants.OPERATION_MERGE_REPOSITORY)
+ @RedbackAuthorization (permissions = ArchivaRoleConstants.OPERATION_MERGE_REPOSITORY, resource = "{sourceRepositoryId}")
void mergeRepositories( @PathParam ("sourceRepositoryId") String sourceRepositoryId,
@PathParam ("targetRepositoryId") String targetRepositoryId,
@PathParam ("skipConflicts") boolean skipConflicts )