Skip to content

Commit

Permalink
Add permission check for displaying content pack uninstall details (#…
Browse files Browse the repository at this point in the history
…18177) (#18181)

(cherry picked from commit c8adb0b)

Co-authored-by: Othello Maurer <othello@graylog.com>
  • Loading branch information
bernd and thll authored Feb 6, 2024
1 parent 7f8ef7f commit 2cb847c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions changelog/unreleased/pr-18177.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type = "fixed"
message = "Add permission check for displaying content pack uninstall details."

pulls = ["18177"]
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ public ContentPackUninstallDetails uninstallDetails(
@PathParam("contentPackId") ModelId id,
@ApiParam(name = "installationId", value = "Installation ID", required = true)
@PathParam("installationId") String installationId) {
checkPermission(RestPermissions.CONTENT_PACK_READ, id.toString());

final ContentPackInstallation installation = contentPackInstallationPersistenceService.findById(new ObjectId(installationId))
.orElseThrow(() -> new NotFoundException("Couldn't find installation " + installationId));

Expand Down

0 comments on commit 2cb847c

Please sign in to comment.