Package: dexterity.membrane
Introductiondexterity.membrane enables dexterity content items to be used as users and groups in Plone sites and integrates with Products.membrane.CompatibilityThis package is currently tested and developed for Plone 5.2+ and python>=3.7.With Plone 5.2+, Products.membrane 5 or higher is needed.With Plone 6.0+ we recommend Products.membrane >= 6.0.User idAs user id we use the uuid that is generated for the content item.
See the definition ofgetUserIdin theuser.pybehavior.Email as login nameThis package contains a member content type that has an email field.
This is used as login name by the behavior.
SeegetUserName.
Other implementations are possible, so we do not force you to use the email address as the login name in your site.By default, this is on, but you can switch it off in our control panel.
The setting is saved in the Plone registry.Aside from this, it is probably a good idea to also switch on the use_email_as_login property of Plone itself.
The only effect this has as far as this package is concerned, is that some text in login forms is changed:
you seeemail addressas label instead oflogin name, mostly.
To enable this, you can put this inpropertiestool.xml(Plone 4), possibly in a custom package for your project:<?xml version="1.0"?>
<object name="portal_properties" meta_type="Plone Properties Tool">
  <object name="site_properties" meta_type="Plone Property Sheet">
    <property name="use_email_as_login" type="boolean">True</property>
  </object>
</object>Warning about changing settingsIt is best to configure the settings once, and then not touch them anymore.
If you change the settings when you already have created members, some reindexing may be needed.
If there are just a few members, editing and saving them all will be the easiest way.
If you have dozens or hundreds of members this is not very practical.
Future versions might automate this.
If you are interested in helping, apull requestwould be nice.Member content typeThis package defines a member content type, but this may be considered an example;
feel free to create a different type and only use the behaviors or create your own adaptations of them.Behaviorsdexterity.membrane.userthis makes the content behave as a membrane user, defining a way to get the user id (getUserId) and login name (getUserName).dexterity.membrane.provide_passwordadds a password and confirmation field to your dexterity content.
This is used during authentication.dexterity.membrane.groupthis makes the content behave as a membrane group, defining a way to get the group id (getGroupId) and group name (getGroupName).dexterity.membrane.name_from_fullnameuse member fullname to make the object idMembrane implementationProducts.membrane.interfaces.IMembraneUserAuthwe implement authentication using the email field and the password field.Products.membrane.interfaces import IMembraneUserPropertieswe provide a read-only mapping from the first and last name fields of our ownIMemberschema to the fullname user property.
We have a read-write mapping for the email, home_page/homepage and description/bio properties/fields forIMember.Local rolesThis package defines a local role provider.
It makes sure a logged in user gets the local Reader, Editor and Creator roles on the membrane object that belongs to that user.WorkflowWe define a simple workflow with pending/approved states.
A user can only login when in the approved state.EncryptionAs of 1.1.0b3, dexterity.membrane usesbcryptto encrypt new passwords.
This change maintains support for existing SSHA passwords.Changelog3.0.2 (2023-06-07)Remove deprecation warnings.
[ale-rt]3.0.1 (2023-03-24)Fix forAuthEncoding >= 5.0.
[petschki]Rename profiledexterity.membrane: example->dexterity.membrane: contentand add uninstall profile for it.
[petschki]Remove py2.7 and Plone < 5.2 support.
[petschki]Warning: The package is not tested anymore on Plone 5.2 and Python 3.6
because Plone 5.2 is not tested as well on that Python version.3.0.0 (2021-12-06)remove<includeDependencies />[petschki]3.0.0a2 (2020-11-30)Performance improvements: cache expensive bcrypt operations
[ale-rt]3.0.0a1 (2020-02-19)Plone5.2 porting: do not require Archetypes
[ale-rt]ZCML namespace cleanup.
[thet]Added uninstall profile
[agitator]2.1.0 (2019-06-01)Depend on plone.api
[ale-rt]Fixed some docstring
[ale-rt]Biography: plone.app.textfield RichText field for Plone 5
[ksuess]Fix AttributeError: ‘tuple’ object has no attribute ‘strip’
[b4oshany]2.0.1 (2018-01-18)Performance improvements: cache expensive bcrypt operations
[ale-rt]2.0 (2017-10-21)Removed collective.indexing dependency. Collective.indexing was merged into Plone 5.1
If you’re using this package with a Plone version < than 5.1, please add collective.indexing manually and pin Products.membrane to < 4.
[agitator]Dropping official support for Plone < 4.3, use 1.2.x for older versions of Plone.
[agitator]1.2 (2017-01-11)No longer officially support Python 2.6.  See compatibility in readme.
[maurits]Enable use_email_as_username without use_uuid_as_userid.
This fixes getUserId, which fixes the indexed user values,
which fixes enumerateUsers.
Warning: if you already have members and you change the settings,
this may need reindexing, or editing and saving all users manually.
Fixeshttps://github.com/collective/dexterity.membrane/issues/26[gyst]1.1.2 (2016-08-05)Added backwards compatibility import formembranepasswords.IProvidePasswords.
Otherwise z3c.relationfield may give problems when editing content.
Fixeshttps://github.com/collective/dexterity.membrane/issues/23[mikejmets]1.1.1 (2016-07-06)A group might accidentally show up as a user.portal_membership.listMembersthen says:AttributeError: 'NoneType' object has no attribute '__of__'.  We prevent this by
implementing getUserId and getUserName on groups, returning the
group id and group name.  [maurits]1.1.0 (2015-10-07)Switch to bcrypt encryption for passwords
(includes backwards-compatibility with existing SSHA passwords)
[mgrbyte]1.1.0b2 (2015-03-03)added BBB class for IMembraneGroup, IProvidePasswordsSchema and IMembraneUser
[agitator]1.1.0b1 (2015-03-02)fix release1.1.0b0 (2015-03-02)support special characters/umlauts in passwords
[agitator]renaming with bbb imports: remove lastmembranefrom alldexterity.membrane.behavior.membrane*.
[jensens]fix: makePasswordProviderwork. The whole was inactive and broken after
activation.
[jensens]Get rid of deprecated plone.directives and use plone core functionality to
achieve same goals. Also minor modernization of buildout.
[jensens]Declare plone.directives.form dependency.
[vincentfretin]1.0 (2014-10-16)add a hook using a utility to add a password checker in own customization
code. we may want to provide an default, but yet not sure how it should
look like.
[jensens]make it easier to inherit passowrd for own behavior
[jensens]Remove grok dependency, refactor a bit to reduce complexity in one module.
Attention: password related behaviour is now in own module. Needs update of
customizations/own code after upgrade.
[jensens]Cleanup, pep8, plone-code-style, make tests fly again.
[jensens]Make get_full_name a method of MembraneUser so it can be easily customized.
[cedricmessiant, vincentfretin]Add French translations.
[cedricmessiant]0.4 (2013-07-18)Add upgrade step to update the behavior profile.  If you have
installed the example content profile, you will see a warning in the
Add-ons control panel that Plone does not know how to update this
profile.  We recommend that you deactivate it and then activate it
again.  Issue #7
[maurits]Rename content profile to example and rename behavior profile to
default.  Issue #7.
[maurits]Add Spanish and Brazilian Portuguese translations. [hvelarde]0.3 (2013-05-15)Fix installation problems when OS does not support symbolic links. RenamedREADME.txttoREADME.rstand updatedsetup.pyto point to that
file. This fixes #5.
[saily]Fix getattr in getPropertiesForUser to have a default value.
[datakurre]0.2 (2013-02-19)Keep constistent with plone’s email login #12187, so don’t lowercase email
addresses.
[saily]Add basic membrane group behavior
[saily]0.1 (2012-09-20)Initial alpha release