Drop the 365-day check when deciding if an account is enabled.

This commit is contained in:
Jon Chambers
2020-09-28 17:15:36 -04:00
committed by Jon Chambers
parent 73da4844ee
commit 65cdd5fcbe
2 changed files with 20 additions and 32 deletions

View File

@@ -160,10 +160,7 @@ public class Account implements Principal {
}
public boolean isEnabled() {
final boolean enabled =
getMasterDevice().isPresent() &&
getMasterDevice().get().isEnabled() &&
getLastSeen() > (System.currentTimeMillis() - TimeUnit.DAYS.toMillis(365));
final boolean enabled = getMasterDevice().map(Device::isEnabled).orElse(false);
if (enabled) {
ENABLED_ACCOUNT_COUNTER.increment();