Commit f62e6651 authored by Jérome Perrin's avatar Jérome Perrin

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

parent fac26f62
No related merge requests found
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