mirror of
https://github.com/gotson/komga.git
synced 2025-12-20 07:23:34 +01:00
fix(api): prevent retrieving own user activity in demo profile
closes #643
This commit is contained in:
parent
619e51bdcd
commit
59c187f3b7
1 changed files with 1 additions and 0 deletions
|
|
@ -161,6 +161,7 @@ class UserController(
|
|||
@RequestParam(name = "unpaged", required = false) unpaged: Boolean = false,
|
||||
@Parameter(hidden = true) page: Pageable,
|
||||
): Page<AuthenticationActivityDto> {
|
||||
if (demo && !principal.user.roleAdmin) throw ResponseStatusException(HttpStatus.FORBIDDEN)
|
||||
val sort =
|
||||
if (page.sort.isSorted) page.sort
|
||||
else Sort.by(Sort.Order.desc("dateTime"))
|
||||
|
|
|
|||
Loading…
Reference in a new issue