Hi!
Currently there are no other way to show dashboard without giving read access to nodes where data is collected, so your approach is absolutely right.
As for the script, it's actually a bug - in test mode $dci variable is not set. I'll fix it in the next release.
Best regards,
Victor