[fix] Workflow does not permit submission, duplication etc. (#4394)
If the user's roles does not contain the "Allow Edit For" role, the workflow pervents the user from performing functions such as Submit, Duplicate etc. even though the user's other roles actually allow them to perform such functions.
This commit is contained in:
parent
355b1d98b6
commit
1ca8707893
1 changed files with 2 additions and 2 deletions
|
|
@ -955,8 +955,8 @@ _f.Frm.prototype.validate_form_action = function(action, resolve) {
|
|||
// Allow submit, write, cancel and create permissions for read only documents that are assigned by
|
||||
// workflows if the user already have those permissions. This is to allow for users to
|
||||
// continue through the workflow states and to allow execution of functions like Duplicate.
|
||||
if (!frappe.workflow.is_read_only(this.doctype, this.docname) && (perms["write"] ||
|
||||
perms["create"] || perms["submit"] || perms["cancel"])) {
|
||||
if ((frappe.workflow.is_read_only(this.doctype, this.docname) && (perms["write"] ||
|
||||
perms["create"] || perms["submit"] || perms["cancel"])) || !frappe.workflow.is_read_only(this.doctype, this.docname)) {
|
||||
var allowed_for_workflow = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue