Apart from the default local roles renaming discussed earlier on cps-devel, CPS probably needs a way to better define which local roles are relevant according to the context.
Currently, this information is spread in several places:
- CPSDefault/skins/cps_default/getCPSLocaleRoles whose result is based on :
- CPSCore/CPSMembershipTool.getCPSCandidateLocalRoles
- CPSSubscriptions/SubscriptionsTool.setLocalRolesArea and related methods
1 & 2 are used to display the list of possible roles to assign with the [folder|forum|cps_chat]_localrole_form.pt templates.
3 is used by the folder_notifications_form template.
So here are a few
Proposals:
- Build a new dedicated tool (in CPSDefault) to store the localrole related code of SubscriptionsTool? and use it in the skins templates and scripts
A-bis. Use the CPSMembershipTool of CPSDefault instead of CPSCore's to do this.
- Ask the portal_wokflow tool to guess which localroles are relevant according to context's portal_type + wf state (what about stacks ?)
Maybe a mix of A and B is possible.