Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix adding Site Administrator roles for when

  custom workflows might not have the permission_roles
  for states set
  • Loading branch information...
commit df61c3b4eabaf2cacb1f57bf1cd06e035d19ece9 1 parent 33652c4
@vangheem vangheem authored
Showing with 6 additions and 1 deletion.
  1. +4 −1 CHANGES.txt
  2. +2 −0  plone/app/upgrade/v41/alphas.py
View
5 CHANGES.txt
@@ -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)
View
2  plone/app/upgrade/v41/alphas.py
@@ -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

@davisagli
Owner

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

@vangheem
Owner

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

@davisagli
Owner

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

@vangheem
Owner

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.
Something went wrong with that request. Please try again.