Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a write on read situation (Plone 4.3) #18

Merged
merged 1 commit into from
Oct 28, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Changelog
3.0.9 (unreleased)
------------------

- Nothing changed yet.
- CSRF fix: safe write on read.
[gforcada]


3.0.8 (2014-10-22)
Expand Down
3 changes: 2 additions & 1 deletion plone/app/contentrules/browser/assignments.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,19 @@ def __call__(self):
request = aq_inner(self.request)
form = request.form
status = IStatusMessage(self.request)
assignable = IRuleAssignmentManager(context)

operation = request.get('operation', None)

if operation == 'move_up':
assignable = IRuleAssignmentManager(context)
rule_id = request.get('rule_id')
keys = list(assignable.keys())
idx = keys.index(rule_id)
del keys[idx]
keys.insert(idx-1, rule_id)
assignable.updateOrder(keys)
elif operation == 'move_down':
assignable = IRuleAssignmentManager(context)
rule_id = request.get('rule_id')
keys = list(assignable.keys())
idx = keys.index(rule_id)
Expand Down