mirror of
https://github.com/openstf/stf
synced 2025-10-04 18:29:17 +02:00
Rename "isOwnedByUser" to "using".
This commit is contained in:
parent
30b04ab2d2
commit
022977886c
3 changed files with 3 additions and 3 deletions
|
@ -265,7 +265,7 @@ module.exports = function(options) {
|
||||||
, present: false
|
, present: false
|
||||||
, ready: false
|
, ready: false
|
||||||
, lastHeartbeatAt: null
|
, lastHeartbeatAt: null
|
||||||
, isOwnedByUser: false
|
, using: false
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.on(wire.JoinGroupMessage, function(channel, message) {
|
.on(wire.JoinGroupMessage, function(channel, message) {
|
||||||
|
|
|
@ -51,7 +51,7 @@ module.exports.applyData = function(device) {
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports.applyOwner = function(device, user) {
|
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
|
return device
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ module.exports = function DeviceServiceFactory($rootScope, $http, socket) {
|
||||||
// preparations are ready AND the device has no owner or we are the
|
// preparations are ready AND the device has no owner or we are the
|
||||||
// owner
|
// owner
|
||||||
data.usable = data.present && data.status === 3 && data.ready &&
|
data.usable = data.present && data.status === 3 && data.ready &&
|
||||||
(!data.owner || data.isOwnedByUser)
|
(!data.owner || data.using)
|
||||||
}
|
}
|
||||||
|
|
||||||
function get(data) {
|
function get(data) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue