AccountDetailInfo: Include flag if account is inactive
It's annoying that the account GetDetail REST endpoint tells you all about the account, but not if it's active or not, and that this information has to be retrieved by calling another REST endpoint. Change-Id: Ie09297c9bd2da91b3f6d6fd5718f35d0b0a307b0 Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -42,6 +42,7 @@ public class GetDetail implements RestReadView<AccountResource> {
|
||||
Account a = rsrc.getUser().getAccount();
|
||||
AccountDetailInfo info = new AccountDetailInfo(a.getId().get());
|
||||
info.registeredOn = a.getRegisteredOn();
|
||||
info.inactive = !a.isActive() ? true : null;
|
||||
try {
|
||||
directory.fillAccountInfo(Collections.singleton(info), EnumSet.allOf(FillOptions.class));
|
||||
} catch (DirectoryException e) {
|
||||
@@ -53,6 +54,7 @@ public class GetDetail implements RestReadView<AccountResource> {
|
||||
|
||||
public static class AccountDetailInfo extends AccountInfo {
|
||||
public Timestamp registeredOn;
|
||||
public Boolean inactive;
|
||||
|
||||
public AccountDetailInfo(Integer id) {
|
||||
super(id);
|
||||
|
Reference in New Issue
Block a user