The route only checks that the snapshot belongs to the device's team. Device groups check that the snapshot belongs to the same application, because granular RBAC can give a user access to one application and not another in the same team.
Steps to reproduce
- A user has
device:edit on application A and no access to application B in the same team.
- They set a snapshot of an instance in application B as the target of a device in application A.
The route accepts it, and the device deploys the other application's flows.
Expected
The route rejects a snapshot from a different application, the same way updateDeviceGroup does.
Reference
forge/routes/api/device.js:743-747, forge/ee/db/controllers/DeviceGroup.js:107-122.
The route only checks that the snapshot belongs to the device's team. Device groups check that the snapshot belongs to the same application, because granular RBAC can give a user access to one application and not another in the same team.
Steps to reproduce
device:editon application A and no access to application B in the same team.The route accepts it, and the device deploys the other application's flows.
Expected
The route rejects a snapshot from a different application, the same way
updateDeviceGroupdoes.Reference
forge/routes/api/device.js:743-747,forge/ee/db/controllers/DeviceGroup.js:107-122.