Commit 6e31b00b authored by Jérome Perrin's avatar Jérome Perrin Committed by Eteri

*: use new .getActiveUserPreference to jump to preference user can edit

parent a5cf2e74
request = context.REQUEST
return request.RESPONSE.redirect( "%s/Preference_viewAccounting" %
context.portal_preferences.getActivePreference().absolute_url())
portal = context.getPortalObject()
active_preference = portal.portal_preferences.getActiveUserPreference()
if not active_preference:
active_preference = portal.portal_preferences.getActivePreference()
# vim: syntax=python
return active_preference.Base_redirect(form_id='Preference_viewAccounting')
......@@ -4,7 +4,7 @@ if context.portal_membership.isAnonymousUser():
return dumps(None)
portal_preferences = context.portal_preferences
preference = portal_preferences.getActivePreference()
preference = portal_preferences.getActiveUserPreference()
preference_dict = {}
......
......@@ -2,9 +2,9 @@
preference_tool = context.getPortalObject().portal_preferences
preference = preference_tool.getActivePreference()
preference = preference_tool.getActiveUserPreference()
if preference is not None and preference.getPriority() == 3: # XXX: 3 is Priority.USER
if preference is not None:
return preference.Base_redirect('view')
return preference_tool.Base_redirect('view')
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment