This is the end of a server-role scoped UDF
let boundsensorMappingSet = MimamoriSensorShare
.byBoundCompanyProperty(managementCompany, Property.byId(payload.propertyId))
.map(
share=>{
let sensorMapping = share!.sensor! {
sensorId,
roomTitle
}
let notificationSettings = share!.notificationSettings! {
id,
enableMotionNotifications,
sendNotifications,
notificationAddresses {
emailId,
email
}
}
{
sensorId: sensorMapping!.sensorId!,
roomTitle: sensorMapping!.roomTitle!,
sensorShares: [],
notificationSettings: share!.notificationSettings!
}
}
)
boundsensorMappingSet.paginate(1000).data
Here is the result:
[
{
"sensorId": "sigfox-FAKEID2",
"roomTitle": "101",
"sensorShares": [],
"notificationSettings": {
"@ref": {
"id": "380868249832653312",
"coll": {
"@mod": "MimamoriSensorNotificationSettings"
},
"exists": false,
"cause": "permission denied"
}
}
}
]
Why can’t I access notificationSettings
and what’s the best way to accomplish passing this document outside of a server-role scoped UDF?