don't attempt to run protected notes outside of protected session, fixes #279

This commit is contained in:
azivner 2019-01-08 21:21:49 +01:00
parent 8e8fd88857
commit 012ba9e060

View file

@ -6,7 +6,7 @@ const sourceIdService = require('./source_id');
const log = require('./log');
async function executeNote(note, originEntity) {
if (!note.isJavaScript()) {
if (!note.isJavaScript() || !note.isContentAvailable) {
return;
}
@ -80,6 +80,10 @@ function getParams(params) {
}
async function getScriptBundle(note, root = true, scriptEnv = null, includedNoteIds = []) {
if (!note.isContentAvailable) {
return;
}
if (!note.isJavaScript() && !note.isHtml()) {
return;
}