mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Added POLICY_REVOKE operation upon deletion of the last policy
This commit is contained in:
parent
73539362d4
commit
036ed6fe41
@ -68,12 +68,14 @@ public class PolicyEnforcementDelegatorImpl implements PolicyEnforcementDelegato
|
||||
identifier.setType(device.getType());
|
||||
|
||||
Policy policy = this.getEffectivePolicy(identifier);
|
||||
|
||||
List<DeviceIdentifier> deviceIdentifiers = new ArrayList<>();
|
||||
deviceIdentifiers.add(identifier);
|
||||
if (policy != null) {
|
||||
List<DeviceIdentifier> deviceIdentifiers = new ArrayList<>();
|
||||
deviceIdentifiers.add(identifier);
|
||||
this.addPolicyRevokeOperation(deviceIdentifiers);
|
||||
this.addPolicyOperation(deviceIdentifiers, policy);
|
||||
} else {
|
||||
//This means all the applicable policies have been removed from device. Hence calling a policy revoke.
|
||||
this.addPolicyRevokeOperation(deviceIdentifiers);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user