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 cbd4357..5f8e1f3 100755
--- a/core/src/main/java/de/bstly/we/businesslogic/PermissionManager.java
+++ b/core/src/main/java/de/bstly/we/businesslogic/PermissionManager.java
@@ -418,8 +418,8 @@ public class PermissionManager implements UserDataProvider {
for (Permission existingPermission : existingPermissions) {
if (existingPermission.getExpires().isBefore(permissionsExpires)) {
if (starts != null) {
- if (existingPermission.getStarts() == null
- || existingPermission.getStarts().isAfter(starts)) {
+ if (existingPermission.getStarts() == null || existingPermission.getStarts().isAfter(starts)
+ || existingPermission.getExpires().isAfter(starts)) {
permission = existingPermission;
break;
}
diff --git a/pom.xml b/pom.xml
index 7bc28e5..fdf647c 100755
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,7 @@
UTF-8
11
2.19.0
- 2.0.4-SNAPSHOT
+ 2.0.5-SNAPSHOT