server: export full response view for zones response when caller is root admin (#3989)

The listZonesMetrics does not return same keys are listZones as the
default response view is restricted. This fixes that by ensuring that
for root admin full response view is used.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2020-03-25 12:53:41 +05:30 committed by GitHub
parent e9b652a5b7
commit 2e3390f06e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2881,7 +2881,7 @@ public class QueryManagerImpl extends MutualExclusiveIdsManagerBase implements Q
ListResponse<ZoneResponse> response = new ListResponse<ZoneResponse>();
ResponseView respView = ResponseView.Restricted;
if (cmd instanceof ListZonesCmdByAdmin) {
if (cmd instanceof ListZonesCmdByAdmin || CallContext.current().getCallingAccount().getType() == Account.ACCOUNT_TYPE_ADMIN) {
respView = ResponseView.Full;
}