mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fixed adding operations to invalid devices
This commit is contained in:
parent
763993263c
commit
811d225bc3
@ -102,7 +102,7 @@ public class OperationManagerImpl implements OperationManager {
|
||||
DeviceIDHolder deviceIDHolder = DeviceManagerUtil.validateDeviceIdentifiers(deviceIds);
|
||||
List<DeviceIdentifier> validDeviceIds = deviceIDHolder.getValidDeviceIDList();
|
||||
if (validDeviceIds.size() > 0) {
|
||||
List<DeviceIdentifier> authorizedDeviceList = this.getAuthorizedDevices(operation, deviceIds);
|
||||
List<DeviceIdentifier> authorizedDeviceList = this.getAuthorizedDevices(operation, validDeviceIds);
|
||||
if (authorizedDeviceList.size() <= 0) {
|
||||
log.info("User : " + getUser() + " is not authorized to perform operations on given device-list.");
|
||||
return null;
|
||||
@ -123,7 +123,7 @@ public class OperationManagerImpl implements OperationManager {
|
||||
|
||||
//TODO have to create a sql to load device details from deviceDAO using single query.
|
||||
String operationCode = operationDto.getCode();
|
||||
for (DeviceIdentifier deviceId : deviceIds) {
|
||||
for (DeviceIdentifier deviceId : authorizedDeviceList) {
|
||||
Device device = getDevice(deviceId);
|
||||
enrolmentId = device.getEnrolmentInfo().getId();
|
||||
//Do not repeat the task operations
|
||||
|
||||
Loading…
Reference in New Issue
Block a user