Permalink
Browse files

Fix adding Site Administrator roles for when

  custom workflows might not have the permission_roles
  for states set
  • Loading branch information...
1 parent 33652c4 commit df61c3b4eabaf2cacb1f57bf1cd06e035d19ece9 @vangheem vangheem committed Dec 14, 2011
Showing with 6 additions and 1 deletion.
  1. +4 −1 CHANGES.txt
  2. +2 −0 plone/app/upgrade/v41/alphas.py
View
@@ -4,7 +4,10 @@ Changelog
1.2b2 (unreleased)
------------------
-- Nothing changed yet.
+- Fix adding Site Administrator roles for when
+ custom workflows might not have the permission_roles
+ for states set.
+ [vangheem]
1.2b1 (2011-12-05)
@@ -102,6 +102,8 @@ def add_siteadmin_role(context):
workflow = wtool[workflow_id]
for state_id in workflow.states:
state = workflow.states[state_id]
+ if state.permission_roles is None:
+ continue
for permission_id, roles in state.permission_roles.items():
if 'Manager' in roles:
new_roles = list(roles)

4 comments on commit df61c3b

Owner

davisagli replied Dec 15, 2011

Thanks for the fix. This should get backported to the 1.1 branch for Plone 4.1, right?

Owner

vangheem replied Dec 15, 2011

Yes, I should. How do we manage that here? Just use the 1.1 branch?

Owner

davisagli replied Dec 15, 2011

Yeah. Easiest is check out that branch then do git cherry-pick df61c3b

Owner

vangheem replied Dec 15, 2011

hhmmm, the cherry-pick command didn't work out completely right but I got it over. Thanks for always being on top of things David.

Please sign in to comment.