mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-17 23:53:25 +02:00
add remoteDebugUrl into database so that it is accessible from api
This commit is contained in:
@@ -54,10 +54,20 @@ datautil.applyOwner = function(device, user) {
|
||||
return device
|
||||
}
|
||||
|
||||
// Only owner can see this information
|
||||
datautil.applyOwnerOnlyInfo = function(device, user) {
|
||||
if (device.owner && device.owner.email === user.email) {
|
||||
} else {
|
||||
device.remoteConnect = false
|
||||
device.remoteDebugUrl = null
|
||||
}
|
||||
}
|
||||
|
||||
datautil.normalize = function(device, user) {
|
||||
datautil.applyData(device)
|
||||
datautil.applyBrowsers(device)
|
||||
datautil.applyOwner(device, user)
|
||||
datautil.applyOwnerOnlyInfo(device, user)
|
||||
if (!device.present) {
|
||||
device.owner = null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user