diff --git a/lib/roles/app.js b/lib/roles/app.js index 97fd73c3..f88b9fec 100644 --- a/lib/roles/app.js +++ b/lib/roles/app.js @@ -265,7 +265,7 @@ module.exports = function(options) { , present: false , ready: false , lastHeartbeatAt: null - , isOwnedByUser: false + , using: false }) }) .on(wire.JoinGroupMessage, function(channel, message) { diff --git a/lib/util/datautil.js b/lib/util/datautil.js index 10ecb67b..0dafb3f0 100644 --- a/lib/util/datautil.js +++ b/lib/util/datautil.js @@ -51,7 +51,7 @@ module.exports.applyData = function(device) { } module.exports.applyOwner = function(device, user) { - device.isOwnedByUser = !!device.owner && device.owner.email === user.email + device.using = !!device.owner && device.owner.email === user.email return device } diff --git a/res/app/components/stf/device/device-service.js b/res/app/components/stf/device/device-service.js index 196634c1..94b03087 100644 --- a/res/app/components/stf/device/device-service.js +++ b/res/app/components/stf/device/device-service.js @@ -22,7 +22,7 @@ module.exports = function DeviceServiceFactory($rootScope, $http, socket) { // preparations are ready AND the device has no owner or we are the // owner data.usable = data.present && data.status === 3 && data.ready && - (!data.owner || data.isOwnedByUser) + (!data.owner || data.using) } function get(data) {