Sort order of roles in @@usergroup-groupprefs has changed.
In 5.1:
Contributor | Editor | Member | Reader | Reviewer | Site Administrator | Manager
In 5.2:
Site Administrator | Member | Editor | Reader | Contributor | Reviewer | Manager
This is due to a change in AccessControl that usses set now: https://github.com/zopefoundation/AccessControl/commit/d7373d8a41bee48507f2d1370133fdb02ce8e035#diff-1e5eab2c212b1982e8e0ab386e7bdc0dR409
Should we somehow sort the roles as before or is this a non-issue?
Found it when fixing the test test_groups_modify_roles in https://github.com/plone/Products.CMFPlone/commit/83b442e5f2bb0caace355789a9ba2c02619c6eb3
Sorting it alphabetically may be best. Now it seems random.
Of course then it won't be sorted once you translate the roles; keeping the order the same in all languages is probably best for people who manage multiple sites in different languages.
I would put the roles in order of "powers", e.g. something like:
Member | Reader | Contributor | Reviewer | Editor | Site Administrator |
Manager
or leave it unchanged from the way it has always been.
On Mon, Oct 23, 2017 at 6:58 PM Maurits van Rees notifications@github.com
wrote:
Sorting it alphabetically may be best. Now it seems random.
Of course then it won't be sorted once you translate the roles; keeping
the order the same in all languages is probably best for people who manage
multiple sites in different languages.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/plone/Products.CMFPlone/issues/2185#issuecomment-338725682,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAcHxtebMSstF-8q6Fr5BXlMRZjbqxi2ks5svMWZgaJpZM4QCaFP
.
But then you get into debates about the relative power of each role.
They are just different roles, not necessarily in a strict power order.
This may also depends on the workflows in use at the site.
Sure, we can pick one order that seems reasonable, and I am not going to fight about that. But alphabetical order seems more practical to me. Probably easier to code too. :-)
portal.__ac_roles__ has a list of the roles that have been set up for the portal. Let's use the order there, which gives control to the integrator (it can be controlled via rolemap.xml).
Wow, I have no recollection of making that previous comment, but I submitted a PR to fix this in AccessControl yesterday: https://github.com/zopefoundation/AccessControl/pull/62
Fixed. See http://demo.plone.org/@@usergroup-groupprefs for proof.
Most helpful comment
portal.__ac_roles__has a list of the roles that have been set up for the portal. Let's use the order there, which gives control to the integrator (it can be controlled via rolemap.xml).