try to hotfix permission expiring
This commit is contained in:
parent
6d7407979d
commit
ba28c98e44
@ -416,7 +416,11 @@ public class PermissionManager implements UserDataProvider {
|
||||
List<Permission> 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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user