adamsaghy commented on code in PR #4235:
URL: https://github.com/apache/fineract/pull/4235#discussion_r1899457158


##########
fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/api/LoanInterestPauseApiResource.java:
##########
@@ -114,4 +117,38 @@ public List<InterestPauseResponseDto> 
retrieveInterestPausesByExternalId(
 
         return 
this.interestPauseReadPlatformService.retrieveInterestPauses(loanExternalId);
     }
+
+    @DELETE
+    @Path("/{loanId}/interest-pauses/{variationId}")
+    @Operation(summary = "Delete an interest pause period", description = 
"Deletes a specific interest pause period by its variation ID.")
+    @ApiResponses({ @ApiResponse(responseCode = "204", description = "No 
Content") })
+    public Response deleteInterestPause(@PathParam("loanId") 
@Parameter(description = "loanId") final Long loanId,
+            @PathParam("variationId") @Parameter(description = "variationId") 
final Long variationId) {
+
+        
this.context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS);

Review Comment:
   I know i have missed this in the previous PR, but i noticed here... Just 
because the user has read permission on the loan, it shall not be able to add, 
modify or delete interest pauses! If we are validating permission that should 
be "UPDATE LOAN" in this case.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to