diff --git a/frappe/__init__.py b/frappe/__init__.py index ed26d0a280..53b4fda4f5 100644 --- a/frappe/__init__.py +++ b/frappe/__init__.py @@ -14,7 +14,7 @@ import os, sys, importlib, inspect, json from .exceptions import * from .utils.jinja import get_jenv, get_template, render_template, get_email_from_template -__version__ = '8.10.1' +__version__ = '8.10.2' __title__ = "Frappe Framework" local = Local() diff --git a/frappe/core/doctype/communication/communication.js b/frappe/core/doctype/communication/communication.js index 0b3db95540..5c8c5a6a22 100644 --- a/frappe/core/doctype/communication/communication.js +++ b/frappe/core/doctype/communication/communication.js @@ -193,6 +193,7 @@ frappe.ui.form.on("Communication", { }); return { + frm: frm, doc: frm.doc, last_email: frm.doc, sender: sender_email_id, diff --git a/frappe/core/page/permission_manager/permission_manager.py b/frappe/core/page/permission_manager/permission_manager.py index 996c7b23d2..32a85d2864 100644 --- a/frappe/core/page/permission_manager/permission_manager.py +++ b/frappe/core/page/permission_manager/permission_manager.py @@ -3,14 +3,16 @@ from __future__ import unicode_literals import frappe +from frappe import _ import frappe.defaults from frappe.modules.import_file import get_file_path, read_doc_from_file from frappe.translate import send_translations -from frappe.permissions import (reset_perms, get_linked_doctypes, get_all_perms, - setup_custom_perms, add_permission, update_permission_property) from frappe.core.doctype.doctype.doctype import (clear_permissions_cache, validate_permissions_for_doctype) -from frappe import _ +from frappe.permissions import (reset_perms, get_linked_doctypes, get_all_perms, + setup_custom_perms, add_permission, update_permission_property) + +not_allowed_in_permission_manager = ["DocType", "Patch Log", "Module Def"] @frappe.whitelist() def get_roles_and_doctypes(): @@ -21,7 +23,7 @@ def get_roles_and_doctypes(): doctypes = frappe.get_all("DocType", filters={ "istable": 0, - "name": ("not in", "DocType"), + "name": ("not in", ",".join(not_allowed_in_permission_manager)), }, or_filters={ "ifnull(restrict_to_domain, '')": "", "restrict_to_domain": ("in", active_domains) @@ -93,7 +95,6 @@ def reset(doctype): reset_perms(doctype) clear_permissions_cache(doctype) - @frappe.whitelist() def get_users_with_role(role): frappe.only_for("System Manager") diff --git a/frappe/public/js/frappe/upload.js b/frappe/public/js/frappe/upload.js index f8c2e579dd..319fc61971 100644 --- a/frappe/public/js/frappe/upload.js +++ b/frappe/public/js/frappe/upload.js @@ -53,7 +53,7 @@ frappe.upload = { $uploaded_files_wrapper.removeClass('hidden').empty(); file_array = file_array.map( - file => Object.assign(file, {is_private: opts.is_private || 1}) + file => Object.assign(file, {is_private: opts.is_private ? 1 : 0}) ) $upload.data('attached_files', file_array); diff --git a/frappe/public/js/frappe/views/communication.js b/frappe/public/js/frappe/views/communication.js index 92db9c1a48..f62914b822 100755 --- a/frappe/public/js/frappe/views/communication.js +++ b/frappe/public/js/frappe/views/communication.js @@ -309,7 +309,8 @@ frappe.views.CommunicationComposer = Class.extend({ var args = { args: { - from_form: 1,folder:"Home/Attachments" + from_form: 1, + folder:"Home/Attachments" }, callback: function(attachment, r) { me.attachments.push(attachment); }, max_width: null, @@ -331,10 +332,10 @@ frappe.views.CommunicationComposer = Class.extend({ } $("
" - +__("Select Attachments")+"
\ -

\ - " - +__("Add Attachment")+"

").appendTo(attach.empty()) + +__("Select Attachments")+"
\ +

\ + " + +__("Add Attachment")+"

").appendTo(attach.empty()) attach.find(".add-more-attachments a").on('click',this,function() { me.upload = frappe.ui.get_upload_dialog(args); })