Products.cmfplone: Sorting of roles has changed in 5.2

Created on 23 Oct 2017  Â·  6Comments  Â·  Source: plone/Products.CMFPlone

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

regression

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).

All 6 comments

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.

  • Member vs Reader: probably usually a Reader is a Member with extra rights. But a user may be authenticated (say via SAML) and have the Reader role without being a Member. A Member may be able to add content and a Reader not.
  • Reviewer vs Editor: I would put Reviewer above Editor, because a Reviewer reviews the work of an Editor. But maybe a Reviewer can only accept or reject content, and an Editor change any content at will.
  • Contributor vs Editor: maybe some content can only be added and nothing edited. And maybe the contributor is a world class columnist who gets one thousand euros, and the editor is the nephew of the boss who gets one euro to fix the typos.

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

Was this page helpful?
0 / 5 - 0 ratings