Package: collective.contentgroups
collective.contentgroupsThis is a PAS (PluggableAuthenticationService) plugin for Plone.
It supports content items as groups.FeaturesA behaviorcollective.contentgroups.groupthat turns a dexterity portal type into a group, with a simpleuserstext field.A PAS plugincontentgroupsthat integrates these groups.An adapterGroupAdapterthat gives content items with our behavior the needed functionality that the standardPloneGroupandGroupDataobjects provide.An installer that installs the plugin intoacl_users.An uninstaller to remove the plugin.Note: this package has no Group portal type.
You will have to enable the behavior yourself on a new or existing dexterity portal type.InstallationInstall collective.contentgroups by adding it to your buildout:[buildout]

...

eggs =
    collective.contentgroupsand then runningbin/buildoutand starting Plone.Now you can install the product in the Add-ons control panel in Plone.
Then go to the Dexterity contenttypes control panel.
Either create a new type or edit an existing type and enable the Group behavior.UsageCreating groupsAny groups that you add in the Users and Groups control panel, are standard Plone groups.In the Content UI, you can create a Group, just like you would create a Page or Folder.
Use the Add New action menu and select the content type for which you have enabled the behavior.Deleting groups is also done in the content UI: simply delete the Group like you would delete a Page.Note that if the Group is private, a Site Adminstrator will see it in the Groups control panel.
But other users may not see the group.
Editors that have no permission to see the group, will not be able to select it in the Sharing tab.
A member of the group may not effectively get the group membership, because the group is not found (in theportal_catalogsearch).In other words: setting a Group in the private state is an effective way to disable it.Adding usersAdding users to a groupmustbe done on the edit form of the content group.
Itcannotbe done in the Users and Groups control panel.
In the Users text field, type the ids of users that you want in this group, one per line.Note: you need theidof the user, not the login name.
Usually they are the same, but they may differ, for example when you use email as login.It is also fine to add a group id in the users field, either from another content group or a standard Plone Group.
Such “recursive” group memberships work seemlessly when you use the Plone recursive groups plugin, which is enabled in default Plone.
For this to work, thecontentgroupsPAS plugin needs to be above therecursive_groupsplugin in theIGroupsPlugin.
The installer takes care of this.To remove a user from the group, simply remove its id from the Users field.In the Users and Groups control panel you will be able to see which users are in a content group and to which content groups a user belongs.
But you won’t be able to change it.Adding rolesYou cannot add roles to groups, not in the edit form and not in the control panel.
What youcando, is:Add the content group to a standard Plone group and give this standard group a role.
For example, you can add the content group to the Reviewers group.Search and select the content group on the Sharing tab and give it a local role.CompatibilityThis works on Plone 5.2 with Python 2.7 and 3.6.
It probably works with earlier Plone versions or later Python versions too, but this has not been tested.SupportIf you are having issues, please let us know.
ContactMaurits van Rees at Zest Software.
Or open an issue in thetracker.LicenseThe project is licensed under the GPLv2.ContributorsMaurits van Rees,m.van.rees@zestsoftware.nlSponsorshipWork oncollective.contentgroupshas been made possible by Ghent University, or UGent.
Seehttps://www.ugent.be.
Ghent University is a top 100 university and one of the major universities in Belgium.Changelog1.0.0a1 (2019-06-07)Initial release.
[maurits]