Merge "AccountDetailInfo: Include flag if account is inactive"
This commit is contained in:
@@ -2128,6 +2128,8 @@ AccountInfo]. In addition `AccountDetailInfo` has the following fields:
|
|||||||
|`registered_on` ||
|
|`registered_on` ||
|
||||||
The link:rest-api.html#timestamp[timestamp] of when the account was
|
The link:rest-api.html#timestamp[timestamp] of when the account was
|
||||||
registered.
|
registered.
|
||||||
|
|`inactive` |not set if `false`|
|
||||||
|
Whether the account is inactive.
|
||||||
|=================================
|
|=================================
|
||||||
|
|
||||||
[[account-external-id-info]]
|
[[account-external-id-info]]
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ public class GetDetail implements RestReadView<AccountResource> {
|
|||||||
Account a = rsrc.getUser().getAccount();
|
Account a = rsrc.getUser().getAccount();
|
||||||
AccountDetailInfo info = new AccountDetailInfo(a.getId().get());
|
AccountDetailInfo info = new AccountDetailInfo(a.getId().get());
|
||||||
info.registeredOn = a.getRegisteredOn();
|
info.registeredOn = a.getRegisteredOn();
|
||||||
|
info.inactive = !a.isActive() ? true : null;
|
||||||
try {
|
try {
|
||||||
directory.fillAccountInfo(Collections.singleton(info), EnumSet.allOf(FillOptions.class));
|
directory.fillAccountInfo(Collections.singleton(info), EnumSet.allOf(FillOptions.class));
|
||||||
} catch (DirectoryException e) {
|
} catch (DirectoryException e) {
|
||||||
@@ -53,6 +54,7 @@ public class GetDetail implements RestReadView<AccountResource> {
|
|||||||
|
|
||||||
public static class AccountDetailInfo extends AccountInfo {
|
public static class AccountDetailInfo extends AccountInfo {
|
||||||
public Timestamp registeredOn;
|
public Timestamp registeredOn;
|
||||||
|
public Boolean inactive;
|
||||||
|
|
||||||
public AccountDetailInfo(Integer id) {
|
public AccountDetailInfo(Integer id) {
|
||||||
super(id);
|
super(id);
|
||||||
|
|||||||
Reference in New Issue
Block a user