Commit fc0e508c authored by Frank Bergmann's avatar Frank Bergmann

Change from cosine case: User with right to reassign WF tasks may edit despite WF running

parent b6fe6025
......@@ -228,9 +228,9 @@ set cost_center_installed_p [apm_package_installed_p "intranet-cost-center"]
# Is there already a workflow controlling the lifecycle of the invoice?
set wf_case_p [db_string wf_case "select count(*) from wf_cases where object_id = :invoice_id"]
set wf_transition_key [db_string wf_transition "select transition_key from wf_tasks where task_id = :task_id" -default ""]
if {"modify" eq $wf_transition_key} { set wf_case_p 0 }
if {[im_user_is_admin_p $user_id]} { set wf_case_p 0 }
if {"modify" eq $wf_transition_key} { set wf_case_p 0 }; # Transition corresponds to editing the object
if {[im_user_is_admin_p $current_user_id]} { set wf_case_p 0 }; # Admins can always override WF
if {[im_permission $current_user_id wf_reassign_tasks]} { set wf_case_p 0 }; # User can override tasks anyway...
# ---------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment