fix: not permitted error when code is edited

This was caused by auto-save when the user is not logged in. Fixed it by
disabling auto-save for guest users.
This commit is contained in:
Anand Chitipothu
2021-04-20 12:20:34 +05:30
parent 91be957885
commit be93a496cc

View File

@@ -73,6 +73,10 @@
codemirror: true,
userdata: data,
autosave: function(editor, code) {
// can't autosave when user is Guest
if (frappe.session.user == "Guest") {
return;
}
var data = editor.options.userdata;
var code = editor.codemirror.doc.getValue();
// console.log("autosaving...")