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