Rimosso default PVM ad integryApplication e controllo app-token in auth/login
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good

This commit is contained in:
2025-06-27 10:59:02 +02:00
parent 39ebee61e6
commit 1cb8f15c14
5 changed files with 10 additions and 6 deletions

View File

@@ -42,7 +42,7 @@ public class RequestDataDTO {
private String password;
private boolean includeNulls = false;
private IntegryApplicationEnum integryApplication = IntegryApplicationEnum.PVM;
private IntegryApplicationEnum integryApplication;
private UserDTO userDTO;

View File

@@ -6,10 +6,10 @@ public enum IntegryApplicationEnum {
PVM("845da2d9-f2f9-4f8d-ad5b-34b65a91eb6d"),
WMS("fa3a21af-606b-4129-a22b-aedc2a52c7b6"),
TASK("478f3a4c51824ad23cb50c1c60670c0f"),
CRM("f0484398-1f8b-42f5-ab79-5282c164e1d8"),
SALESBOOK("f0484398-1f8b-42f5-ab79-5282c164e1d8"),
CONSEGNA("c012124f-4f11-471c-ae12-81bd4a97626c");
private String text;
private final String text;
IntegryApplicationEnum(String text) {
this.text = text;

View File

@@ -147,7 +147,7 @@ public class UserCacheService {
(application == IntegryApplicationEnum.CONSEGNA && x.isWeb()) ||
(application == IntegryApplicationEnum.WMS && x.isWeb()) ||
(application == IntegryApplicationEnum.TASK && x.isWeb()) ||
(application == IntegryApplicationEnum.CRM && x.isWeb()) ||
(application == IntegryApplicationEnum.SALESBOOK && x.isWeb()) ||
(application == IntegryApplicationEnum.GESTIONALE_BASE && x.isInternal())))
.findFirst();
@@ -174,7 +174,7 @@ public class UserCacheService {
(application == IntegryApplicationEnum.CONSEGNA && x.isWeb()) ||
(application == IntegryApplicationEnum.WMS && x.isWeb()) ||
(application == IntegryApplicationEnum.TASK && x.isWeb()) ||
(application == IntegryApplicationEnum.CRM && x.isWeb()) ||
(application == IntegryApplicationEnum.SALESBOOK && x.isWeb()) ||
(application == IntegryApplicationEnum.GESTIONALE_BASE && x.isInternal())))
.findFirst();

View File

@@ -81,6 +81,10 @@ public class AuthService {
throw new Exception("Device id mancante.");
}
if (requestDataDTO.getApplication() == null) {
throw new Exception("X-App-Token mancante.");
}
String username = loginRequestDTO.getUsername();
String password = loginRequestDTO.getPassword();
String deviceId = loginRequestDTO.getDeviceId();

View File

@@ -214,7 +214,7 @@ public class SystemService {
case GESTIONALE_BASE:
sql += " WHERE ( stb_user.flag_intra_user = 'S' OR stb_user.flag_dba = 's') ";
break;
case PVM:
default:
sql += " WHERE ( stb_user.flag_intra_user = 'S' OR stb_user.flag_extra_user = 's') ";
break;
}