hotfix permissions
This commit is contained in:
parent
4bb32dc407
commit
b282131c4d
@ -438,10 +438,6 @@ public class PermissionManager implements UserDataProvider {
|
||||
permission.setStarts(permissionStarts);
|
||||
permission.setExpires(permissionsExpires);
|
||||
} else {
|
||||
if (permission.getStarts() != null && permission.getStarts().isBefore(Instant.now())) {
|
||||
permission.setStarts(null);
|
||||
}
|
||||
|
||||
if (permission.getExpires().isBefore(Instant.now())) {
|
||||
permission.setExpires(Instant.now());
|
||||
}
|
||||
@ -450,6 +446,10 @@ public class PermissionManager implements UserDataProvider {
|
||||
permissionMapping.getLifetimeUnit()));
|
||||
}
|
||||
|
||||
if (permission.getStarts() != null && permission.getStarts().isBefore(Instant.now())) {
|
||||
permission.setStarts(null);
|
||||
}
|
||||
|
||||
if (permissionMapping.isLifetimeRound()) {
|
||||
permission.setExpires(
|
||||
InstantHelper.truncate(permission.getExpires(), permissionMapping.getLifetimeUnit()));
|
||||
|
Loading…
Reference in New Issue
Block a user