diff --git a/core/src/main/java/de/bstly/we/businesslogic/PermissionManager.java b/core/src/main/java/de/bstly/we/businesslogic/PermissionManager.java index bc8ec51..cd8fc92 100755 --- a/core/src/main/java/de/bstly/we/businesslogic/PermissionManager.java +++ b/core/src/main/java/de/bstly/we/businesslogic/PermissionManager.java @@ -416,7 +416,11 @@ public class PermissionManager implements UserDataProvider { List existingPermissions = get(target, name); for (Permission existingPermission : existingPermissions) { - if (existingPermission.getExpires().isBefore(permissionsExpires)) { + if (existingPermission.getExpires().isBefore(permissionsExpires) + || permissionMapping.isLifetimeRound() && InstantHelper + .truncate(existingPermission.getExpires(), permissionMapping.getLifetimeUnit()) + .isBefore(InstantHelper.truncate(permissionsExpires, + permissionMapping.getLifetimeUnit()))) { if (starts != null) { if (existingPermission.getStarts() == null || existingPermission.getStarts().isAfter(starts) || existingPermission.getExpires().isAfter(starts)) {