Skip to content

Commit

Permalink
Merge pull request #133 from collective/check-wf-for-send-action
Browse files Browse the repository at this point in the history
Allow send action only in draft state to prevent side effects for users
  • Loading branch information
MrTango committed Apr 6, 2018
2 parents 34074fc + e39e2f9 commit b0af79e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Changelog
3.0.7 (unreleased)
------------------

- Nothing changed yet.
- Allow send action only in draft state to prevent side effects for users.
[agitator]


3.0.6 (2018-02-18)
Expand Down
2 changes: 1 addition & 1 deletion Products/EasyNewsletter/profiles/plone5/types/ENLIssue.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<permission value="Modify portal content"/>
</action>
<action title="Send" action_id="send" category="easynewsletter"
condition_expr="python:object.portal_type == 'ENLIssue'"
condition_expr="python: portal.portal_workflow.getInfoFor(object, 'review_state') == 'draft' and object.portal_type == 'ENLIssue'"
url_expr="string:${folder_url}/send-issue-form"
visible="True" i18n:domain="plone" i18n:attributes="title">
<permission value="Modify portal content"/>
Expand Down

0 comments on commit b0af79e

Please sign in to comment.