diff --git a/src/main/java/com/pedro/sphynx/domain/AccessService.java b/src/main/java/com/pedro/sphynx/domain/AccessService.java index 03b0ad4..fbc5d8c 100644 --- a/src/main/java/com/pedro/sphynx/domain/AccessService.java +++ b/src/main/java/com/pedro/sphynx/domain/AccessService.java @@ -46,7 +46,7 @@ public AccessDataComplete validateCreation(AccessDataInput data){ } LocalDataComplete local = new LocalDataComplete(localRepository.findByMac(data.mac())); - if(local.permission() < consumer.permission()){ + if(local.permission().level() < consumer.permission()){ var access = new Access(null, consumerRepository.findByTag(data.tag()), localRepository.findByMac(data.mac()), false, LocalDateTime.now()); accessRepository.save(access);