Fixed issue in Policy Task when DeviceAuthorization enabled.

revert-70aa11f8
harshanl 9 years ago
parent 1252d4c160
commit a3e20367f2

@ -82,8 +82,13 @@ public class OperationManagerImpl implements OperationManager {
}
}
try {
List<DeviceIdentifier> authorizedDeviceList = DeviceManagementDataHolder.getInstance().
getDeviceAccessAuthorizationService().isUserAuthorized(deviceIds).getAuthorizedDevices();
List<DeviceIdentifier> authorizedDeviceList;
if (operation != null && PolicyOperation.POLICY_OPERATION_CODE.equals(operation.getCode())) {
authorizedDeviceList = deviceIds;
} else {
authorizedDeviceList = DeviceManagementDataHolder.getInstance().
getDeviceAccessAuthorizationService().isUserAuthorized(deviceIds).getAuthorizedDevices();
}
if (authorizedDeviceList.size() > 0) {
try {
int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId();

Loading…
Cancel
Save