Skip to content

Commit

Permalink
fix: adjust access service to the new relationship between locals and…
Browse files Browse the repository at this point in the history
… permissions
  • Loading branch information
PedroVidalDev committed May 8, 2024
1 parent df6a282 commit f09e46f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/pedro/sphynx/domain/AccessService.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f09e46f

Please sign in to comment.