fix: access to personal pp
This commit is contained in:
parent
22d742ab63
commit
098e98b719
@ -23,6 +23,7 @@ import org.eclipse.microprofile.openapi.annotations.responses.APIResponses;
|
||||
import org.eclipse.microprofile.openapi.annotations.tags.Tag;
|
||||
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
@Tag(name = "Membre", description = "Gestion des membres")
|
||||
@ -119,7 +120,9 @@ public class MembreEndpoints {
|
||||
@APIResponse(responseCode = "500", description = "Erreur interne du serveur")
|
||||
})
|
||||
public Uni<Response> getPhoto(@PathParam("id") long id) throws URISyntaxException {
|
||||
return Utils.getMediaFile(id, media, "ppMembre", membreService.getById(id).onItem().invoke(checkPerm));
|
||||
return Utils.getMediaFile(id, media, "ppMembre", membreService.getById(id).onItem()
|
||||
.call(m -> Objects.equals(m.getUserId(), securityCtx.getSubject()) ?
|
||||
Uni.createFrom().nullItem() : Uni.createFrom().item(m).invoke(checkPerm)));
|
||||
}
|
||||
|
||||
@GET
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user