diff --git a/app/forms/curation_concerns/forms/workflow_action_form.rb b/app/forms/curation_concerns/forms/workflow_action_form.rb index ab74cdee2..f30838b4e 100644 --- a/app/forms/curation_concerns/forms/workflow_action_form.rb +++ b/app/forms/curation_concerns/forms/workflow_action_form.rb @@ -39,7 +39,7 @@ def save def authorized_for_processing return true if CurationConcerns::Workflow::PermissionQuery.authorized_for_processing?( - user: subject.agent, + user: subject.user, entity: subject.entity, action: sipity_workflow_action ) diff --git a/app/services/curation_concerns/workflow/workflow_action_service.rb b/app/services/curation_concerns/workflow/workflow_action_service.rb index 6bf5620dd..f03b03237 100644 --- a/app/services/curation_concerns/workflow/workflow_action_service.rb +++ b/app/services/curation_concerns/workflow/workflow_action_service.rb @@ -30,7 +30,7 @@ def update_sipity_workflow_state def create_sipity_comment return true unless comment_text.present? - Sipity::Comment.create!(entity: subject.entity, agent: subject.agent, comment: comment_text) + Sipity::Comment.create!(entity: subject.entity, agent: subject.user, comment: comment_text) end def handle_sipity_notifications(comment:)