Skip to content

Commit

Permalink
Merge pull request #12 from consiglionazionaledellericerche/11-correg…
Browse files Browse the repository at this point in the history
…ge-condizione-di-invio-segnalazione-via-oil-per-utenti-amministratori

Corretta condizione invio segnalazioni OIL per utenti amministratori.
  • Loading branch information
criluc authored Feb 14, 2024
2 parents 6a42d0f + 5c7ff53 commit 98973ca
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.1] - 2024-02-14
### Added
- Corretta condizione per invio segnalazioni via OIL per utenti amministratori

## [0.1.0] - 2023-09-04
### Added
- Invio delle segnalazione tramite email oppure tramite OIL
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM eclipse-temurin:17-jdk-alpine
VOLUME /tmp
COPY target/*.jar app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0
0.1.1
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public boolean sendFeedback(ReportData data) throws MessagingException, IOExcept
val currentUser = secureUtils.getCurrentUser();

if (config.getOil().isEnabled() && currentUser.isPresent()) {
if (userDao.hasAdminRoles(currentUser.get()) && currentUser.get().getPerson() != null) {
if (!userDao.hasAdminRoles(currentUser.get()) && currentUser.get().getPerson() != null) {
log.info("Invio ad OIL la segnalazione. Utente {}. Categoria: '{} (id={})'. Url: {}. Note: {}",
currentUser.get().getUsername(),
config.getOil().categoryMap().get(data.getCategory()), data.getCategory(),
Expand Down

0 comments on commit 98973ca

Please sign in to comment.