Merge pull request #11014 from prssanna/read-only-share-perm

fix: Add share perm in set_read_only
This commit is contained in:
mergify[bot] 2020-07-20 14:31:59 +00:00 committed by GitHub
commit 0319dca6e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1400,7 +1400,13 @@ frappe.ui.form.Form = class FrappeForm {
var docperms = frappe.perm.get_perm(this.doc.doctype);
for (var i=0, l=docperms.length; i<l; i++) {
var p = docperms[i];
perm[p.permlevel || 0] = {read:1, print:1, cancel:1, email:1};
perm[p.permlevel || 0] = {
read: p.read,
cancel: p.cancel,
share: p.share,
print: p.print,
email: p.email
};
}
this.perm = perm;
}