Skip to content
Extraits de code Groupes Projets
Valider a3233a1e rédigé par youssef.achkir's avatar youssef.achkir
Parcourir les fichiers

change compared ids approach

parent 5391c0ef
Branches
Étiquettes
1 requête de fusion!35feature/VSN-1125 - Move documents implementations
Pipeline #18832 réussi avec les étapes
in 1 minute et 42 secondes
......@@ -358,7 +358,7 @@ public class DocumentServiceImpl implements DocumentService {
Document doc = documentRepository.findById(documentId)
.orElseThrow(() -> new FunctionalException(MessageConstants.DOCUMENT_NOT_FOUND));
if (!(doc.getOwnerId() == ownerId)) {
if (doc.getOwnerId() != ownerId) {
throw new FunctionalException(MessageConstants.UNAUTHORIZED_ACCESS);
}
......@@ -372,7 +372,7 @@ public class DocumentServiceImpl implements DocumentService {
Document doc = documentRepository.findById(documentId)
.orElseThrow(() -> new FunctionalException(MessageConstants.DOCUMENT_NOT_FOUND));
if (!(doc.getOwnerId() == ownerId)) {
if (doc.getOwnerId() != ownerId) {
throw new FunctionalException(MessageConstants.UNAUTHORIZED_ACCESS);
}
......@@ -393,7 +393,7 @@ public class DocumentServiceImpl implements DocumentService {
Document doc = documentRepository.findById(documentId)
.orElseThrow(() -> new FunctionalException(MessageConstants.DOCUMENT_NOT_FOUND));
if (!(doc.getOwnerId() == ownerId)) {
if (doc.getOwnerId() != ownerId) {
throw new FunctionalException(MessageConstants.UNAUTHORIZED_ACCESS);
}
......@@ -445,7 +445,7 @@ public class DocumentServiceImpl implements DocumentService {
Document doc = documentRepository.findById(documentId)
.orElseThrow(() -> new FunctionalException(MessageConstants.DOCUMENT_NOT_FOUND));
if (!(doc.getOwnerId() == ownerId)) {
if (doc.getOwnerId() != ownerId) {
throw new FunctionalException(MessageConstants.UNAUTHORIZED_ACCESS);
}
......
0% ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter