Re: Replacing local roles on users with local roles on groups

Sean Upton <[email protected]>
Newsgroups gmane.comp.web.zope.plone.devel
Message-ID <CANjV-2NOcDFGRLSyE2f=YhRa+QV0H+JYb7PNtWmjwte9qP3JPw@mail.gmail.com>
On Fri, Nov 22, 2013 at 11:22 AM, Dylan Jay <djay-n0pU0XVUApFWk0Htik3J/[email protected]> wrote:
> On 23 Nov 2013, at 4:31 am, Matt Hamilton <[email protected]> wrote:
>
>> Dylan Jay <djay@...> writes:
>>
>>> I think this is sounding good. I think making the groups appear
>>> as regular groups might be a good thing. A couple of times I've
>>> considered implementing a plugin that makes groups from local
>>> roles so that you can reuse a set of users who are say editors
>>> of news in other places such as content roles or other sharing
>>> tabs. Maybe the ui could be changed to give the group a
>>> symbolic name instead if this being a behind the scenes
>>> change? This could also decentralise group management so
>>> you don't need to be a site admin to do it.
>>
>> David Glick also asked for a similar functionality, but I think
>> it would be hell to implement. So, if I want to create a local
>> role group in Folder A, what do I call it?
>
> FolderA_Editors?

I maintain an add-on [1] that does something very-much like this, but
you can end up with:

 (a) Long names like
upiq-immunization-project-south-jordan-u-of-u-community-clinic-contributors
 (which corresponds to using a hyphen to join shortnames in path, plus
a group name corresponding to a specific set of roles).

 (b) You need to have IObjectAddedEvent, IObjectMovedEvent,
IObjectRemovedEvent handlers to keep up with changes, renames -- not
only of folder ids, but ids of parents, because you need to make sure
that the names change in PAS groups plugin(s) as well as recursively
in __ac_local_roles__.

 (c) In retrospect, there may be a case for using UID of content in
the identifier of the group, and a human-friendly group title updated
by event handlers.  This may avoid need to recursively update
__ac_local_roles__ on contained tree of objects because an id change
should not require updating group names anywhere (only update title of
group in PAS on change of folder title).

If I decide (quite likely) to use workspace/folder UID instead of
identical group name/title, this is the before/after in the labels
shown in the sharing tab:

"upiq-immunization-project-south-jordan-u-of-u-community-clinic-contributors"

vs.

"UPIQ Immunization Project / South Jordan U of U Community Clinic -
Contributors"


Notes:

[1] collective.teamwork is yet-another-workspaces-add-on that I expect
to be moved to github.com/collective soon along with a 1.0 release.
This package maintains PAS groups mapped to different local role sets
for each workspace, and has a "Membership" tab for managing users.  It
is a generalization of an in-house package that has been used in
production on a site with thousands of users for 2.5 years.
https://github.com/upiq/collective.teamwork


Sean

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.