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 5c847c1..0778006 100755 --- a/core/src/main/java/de/bstly/we/businesslogic/PermissionManager.java +++ b/core/src/main/java/de/bstly/we/businesslogic/PermissionManager.java @@ -442,6 +442,10 @@ public class PermissionManager implements UserDataProvider { permission.setStarts(null); } + if (permission.getExpires().isBefore(Instant.now())) { + permission.setExpires(Instant.now()); + } + permission.setExpires(InstantHelper.plus(permission.getExpires(), permissionMapping.getLifetime(), permissionMapping.getLifetimeUnit())); } diff --git a/pom.xml b/pom.xml index 4b7aebd..310d821 100755 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ 17 5.0.0 9.37.3 - 3.0.4-SNAPSHOT + 3.0.5-SNAPSHOT