add missing access rights check in getJSONContent with document
reference parameter