From 1b62bee92f4725092b1be489bdf60a194eb5f438 Mon Sep 17 00:00:00 2001 From: Stanislav Trailov Date: Wed, 22 Oct 2025 14:54:40 +0300 Subject: [PATCH] Add update repositopry permission to handleMaxAssignmentsExceeded in deployment management (#2768) * Action history cleanup/purge initial Signed-off-by: strailov * apply changes after review Signed-off-by: strailov * fix hibernate build by annotating delete methods with transactional annotation Signed-off-by: strailov * changes after review and new test cases for new requirements * accept 0 for keep last Signed-off-by: strailov * Fix ManagementSecurityTest Signed-off-by: strailov * apply object utils check Signed-off-by: strailov * fix for oldestAction deletion Signed-off-by: strailov * remove unused comment Signed-off-by: strailov * rename action ids variable Signed-off-by: strailov * Fix access control handling Signed-off-by: Avgustin Marinov * Add update repositopry permission to handleMaxAssignmentsExceeded in deployment management Signed-off-by: strailov --------- Signed-off-by: strailov Signed-off-by: Avgustin Marinov Co-authored-by: Avgustin Marinov --- .../org/eclipse/hawkbit/repository/DeploymentManagement.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/DeploymentManagement.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/DeploymentManagement.java index 77590880b..c1a99482e 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/DeploymentManagement.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/DeploymentManagement.java @@ -412,6 +412,6 @@ public interface DeploymentManagement extends PermissionSupport { @PreAuthorize(SpringEvalExpressions.HAS_UPDATE_REPOSITORY) void cancelActionsForDistributionSet(final ActionCancellationType cancelationType, final DistributionSet set); - @PreAuthorize(SpringEvalExpressions.IS_SYSTEM_CODE) + @PreAuthorize(SpringEvalExpressions.HAS_UPDATE_REPOSITORY + " or " + SpringEvalExpressions.IS_SYSTEM_CODE) void handleMaxAssignmentsExceeded(Long targetId, Long requested, AssignmentQuotaExceededException quotaExceededException); } \ No newline at end of file