return result;
}
private boolean hasCurrentUserAccessToPM(PrivateMessage privateMessage) throws NotFoundException {
JCUser currentUser = userService.getCurrentUser();
PrivateMessageStatus messageStatus = privateMessage.getStatus();
if (currentUser.equals(privateMessage.getUserFrom()) &&
(messageStatus.equals(PrivateMessageStatus.DELETED_FROM_OUTBOX))) {
return false;
}
return !(currentUserIsAuthor(currentUser, privateMessage) &&
(messageStatus.equals(PrivateMessageStatus.DELETED_FROM_INBOX)));
}