dexterity.membrane


Namedexterity.membrane JSON
Version 3.0.2 PyPI version JSON
download
home_pagehttps://github.com/collective/dexterity.membrane
SummaryDexterity content and behaviors to integrate with membrane.
upload_time2023-06-07 06:32:40
maintainer
docs_urlNone
authorMaurits van Rees
requires_python>=3.6
licenseGPL
keywords plone dexterity membrane
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            Introduction
============

dexterity.membrane enables dexterity content items to be used as users and groups in Plone sites and integrates with Products.membrane.

.. image:: https://github.com/collective/dexterity.membrane/workflows/tests/badge.svg
    :target: https://github.com/collective/dexterity.membrane/actions?query=workflow%3Atests


Compatibility
-------------

This 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 id
-------

As user id we use the uuid that is generated for the content item.
See the definition of ``getUserId`` in the ``user.py`` behavior.


Email as login name
-------------------

This package contains a member content type that has an email field.
This is used as login name by the behavior.
See ``getUserName``.
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 see ``email address`` as label instead of ``login name``, mostly.
To enable this, you can put this in ``propertiestool.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 settings
-------------------------------

It 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, a `pull request <https://github.com/collective/dexterity.membrane/pulls>`_ would be nice.


Member content type
-------------------

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


Behaviors
---------

``dexterity.membrane.user``
    this makes the content behave as a membrane user, defining a way to get the user id (``getUserId``) and login name (``getUserName``).

``dexterity.membrane.provide_password``
    adds a password and confirmation field to your dexterity content.
    This is used during authentication.

``dexterity.membrane.group``
    this 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_fullname``
    use member fullname to make the object id


Membrane implementation
-----------------------

``Products.membrane.interfaces.IMembraneUserAuth``
    we implement authentication using the email field and the password field.

``Products.membrane.interfaces import IMembraneUserProperties``
    we provide a read-only mapping from the first and last name fields of our own ``IMember`` schema to the fullname user property.
    We have a read-write mapping for the email, home_page/homepage and description/bio properties/fields for ``IMember``.


Local roles
-----------

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


Workflow
--------

We define a simple workflow with pending/approved states.
A user can only login when in the approved state.


Encryption
----------

As of 1.1.0b3, dexterity.membrane uses bcrypt_ to encrypt new passwords.
This change maintains support for existing SSHA passwords.

.. _bcrypt: https://en.wikipedia.org/wiki/Bcrypt

Changelog
=========


3.0.2 (2023-06-07)
------------------

- Remove deprecation warnings.
  [ale-rt]


3.0.1 (2023-03-24)
------------------

- Fix for `AuthEncoding >= 5.0`.
  [petschki]

- Rename profile `dexterity.membrane: example` -> `dexterity.membrane: content`
  and 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.
  Fixes https://github.com/collective/dexterity.membrane/issues/26
  [gyst]


1.1.2 (2016-08-05)
------------------

- Added backwards compatibility import for ``membranepasswords.IProvidePasswords``.
  Otherwise z3c.relationfield may give problems when editing content.
  Fixes https://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.listMembers`` then 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 release


1.1.0b0 (2015-03-02)
--------------------

- support special characters/umlauts in passwords
  [agitator]

- renaming with bbb imports: remove last ``membrane`` from all
  ``dexterity.membrane.behavior.membrane*``.
  [jensens]

- fix: make ``PasswordProvider`` work. 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. Renamed
  ``README.txt`` to ``README.rst`` and updated ``setup.py`` to 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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/collective/dexterity.membrane",
    "name": "dexterity.membrane",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "plone dexterity membrane",
    "author": "Maurits van Rees",
    "author_email": "maurits@vanrees.org",
    "download_url": "https://files.pythonhosted.org/packages/fa/b0/4a18f806b3510b1990705a1e2b43cd5ba1e6dc0020ccc226c9c2f16da92e/dexterity.membrane-3.0.2.tar.gz",
    "platform": null,
    "description": "Introduction\n============\n\ndexterity.membrane enables dexterity content items to be used as users and groups in Plone sites and integrates with Products.membrane.\n\n.. image:: https://github.com/collective/dexterity.membrane/workflows/tests/badge.svg\n    :target: https://github.com/collective/dexterity.membrane/actions?query=workflow%3Atests\n\n\nCompatibility\n-------------\n\nThis package is currently tested and developed for Plone 5.2+ and python>=3.7.\n\nWith Plone 5.2+, Products.membrane 5 or higher is needed.\n\nWith Plone 6.0+ we recommend Products.membrane >= 6.0.\n\n\nUser id\n-------\n\nAs user id we use the uuid that is generated for the content item.\nSee the definition of ``getUserId`` in the ``user.py`` behavior.\n\n\nEmail as login name\n-------------------\n\nThis package contains a member content type that has an email field.\nThis is used as login name by the behavior.\nSee ``getUserName``.\nOther implementations are possible, so we do not force you to use the email address as the login name in your site.\n\nBy default, this is on, but you can switch it off in our control panel.\nThe setting is saved in the Plone registry.\n\nAside from this, it is probably a good idea to also switch on the use_email_as_login property of Plone itself.\nThe only effect this has as far as this package is concerned, is that some text in login forms is changed:\nyou see ``email address`` as label instead of ``login name``, mostly.\nTo enable this, you can put this in ``propertiestool.xml`` (Plone 4), possibly in a custom package for your project::\n\n  <?xml version=\"1.0\"?>\n  <object name=\"portal_properties\" meta_type=\"Plone Properties Tool\">\n    <object name=\"site_properties\" meta_type=\"Plone Property Sheet\">\n      <property name=\"use_email_as_login\" type=\"boolean\">True</property>\n    </object>\n  </object>\n\n\nWarning about changing settings\n-------------------------------\n\nIt is best to configure the settings once, and then not touch them anymore.\nIf you change the settings when you already have created members, some reindexing may be needed.\nIf there are just a few members, editing and saving them all will be the easiest way.\nIf you have dozens or hundreds of members this is not very practical.\nFuture versions might automate this.\nIf you are interested in helping, a `pull request <https://github.com/collective/dexterity.membrane/pulls>`_ would be nice.\n\n\nMember content type\n-------------------\n\nThis package defines a member content type, but this may be considered an example;\nfeel free to create a different type and only use the behaviors or create your own adaptations of them.\n\n\nBehaviors\n---------\n\n``dexterity.membrane.user``\n    this makes the content behave as a membrane user, defining a way to get the user id (``getUserId``) and login name (``getUserName``).\n\n``dexterity.membrane.provide_password``\n    adds a password and confirmation field to your dexterity content.\n    This is used during authentication.\n\n``dexterity.membrane.group``\n    this makes the content behave as a membrane group, defining a way to get the group id (``getGroupId``) and group name (``getGroupName``).\n\n``dexterity.membrane.name_from_fullname``\n    use member fullname to make the object id\n\n\nMembrane implementation\n-----------------------\n\n``Products.membrane.interfaces.IMembraneUserAuth``\n    we implement authentication using the email field and the password field.\n\n``Products.membrane.interfaces import IMembraneUserProperties``\n    we provide a read-only mapping from the first and last name fields of our own ``IMember`` schema to the fullname user property.\n    We have a read-write mapping for the email, home_page/homepage and description/bio properties/fields for ``IMember``.\n\n\nLocal roles\n-----------\n\nThis package defines a local role provider.\nIt makes sure a logged in user gets the local Reader, Editor and Creator roles on the membrane object that belongs to that user.\n\n\nWorkflow\n--------\n\nWe define a simple workflow with pending/approved states.\nA user can only login when in the approved state.\n\n\nEncryption\n----------\n\nAs of 1.1.0b3, dexterity.membrane uses bcrypt_ to encrypt new passwords.\nThis change maintains support for existing SSHA passwords.\n\n.. _bcrypt: https://en.wikipedia.org/wiki/Bcrypt\n\nChangelog\n=========\n\n\n3.0.2 (2023-06-07)\n------------------\n\n- Remove deprecation warnings.\n  [ale-rt]\n\n\n3.0.1 (2023-03-24)\n------------------\n\n- Fix for `AuthEncoding >= 5.0`.\n  [petschki]\n\n- Rename profile `dexterity.membrane: example` -> `dexterity.membrane: content`\n  and add uninstall profile for it.\n  [petschki]\n\n- Remove py2.7 and Plone < 5.2 support.\n  [petschki]\n\n- Warning: The package is not tested anymore on Plone 5.2 and Python 3.6\n  because Plone 5.2 is not tested as well on that Python version.\n\n\n3.0.0 (2021-12-06)\n------------------\n\n- remove `<includeDependencies />`\n  [petschki]\n\n\n3.0.0a2 (2020-11-30)\n--------------------\n\n- Performance improvements: cache expensive bcrypt operations\n  [ale-rt]\n\n\n3.0.0a1 (2020-02-19)\n--------------------\n\n- Plone5.2 porting: do not require Archetypes\n  [ale-rt]\n\n- ZCML namespace cleanup.\n  [thet]\n\n- Added uninstall profile\n  [agitator]\n\n\n2.1.0 (2019-06-01)\n------------------\n\n- Depend on plone.api\n  [ale-rt]\n- Fixed some docstring\n  [ale-rt]\n- Biography: plone.app.textfield RichText field for Plone 5\n  [ksuess]\n- Fix AttributeError: 'tuple' object has no attribute 'strip'\n  [b4oshany]\n\n\n2.0.1 (2018-01-18)\n------------------\n\n- Performance improvements: cache expensive bcrypt operations\n  [ale-rt]\n\n\n2.0 (2017-10-21)\n----------------\n\n- Removed collective.indexing dependency. Collective.indexing was merged into Plone 5.1\n  If you're using this package with a Plone version < than 5.1, please add collective.indexing manually and pin Products.membrane to < 4.\n  [agitator]\n\n- Dropping official support for Plone < 4.3, use 1.2.x for older versions of Plone.\n  [agitator]\n\n\n1.2 (2017-01-11)\n----------------\n\n- No longer officially support Python 2.6.  See compatibility in readme.\n  [maurits]\n\n- Enable use_email_as_username without use_uuid_as_userid.\n  This fixes getUserId, which fixes the indexed user values,\n  which fixes enumerateUsers.\n  Warning: if you already have members and you change the settings,\n  this may need reindexing, or editing and saving all users manually.\n  Fixes https://github.com/collective/dexterity.membrane/issues/26\n  [gyst]\n\n\n1.1.2 (2016-08-05)\n------------------\n\n- Added backwards compatibility import for ``membranepasswords.IProvidePasswords``.\n  Otherwise z3c.relationfield may give problems when editing content.\n  Fixes https://github.com/collective/dexterity.membrane/issues/23\n  [mikejmets]\n\n\n1.1.1 (2016-07-06)\n------------------\n\n- A group might accidentally show up as a user.\n  ``portal_membership.listMembers`` then says: ``AttributeError:\n  'NoneType' object has no attribute '__of__'``.  We prevent this by\n  implementing getUserId and getUserName on groups, returning the\n  group id and group name.  [maurits]\n\n\n1.1.0 (2015-10-07)\n------------------\n\n- Switch to bcrypt encryption for passwords\n  (includes backwards-compatibility with existing SSHA passwords)\n  [mgrbyte]\n\n\n1.1.0b2 (2015-03-03)\n--------------------\n\n- added BBB class for IMembraneGroup, IProvidePasswordsSchema and IMembraneUser\n  [agitator]\n\n\n1.1.0b1 (2015-03-02)\n--------------------\n\n- fix release\n\n\n1.1.0b0 (2015-03-02)\n--------------------\n\n- support special characters/umlauts in passwords\n  [agitator]\n\n- renaming with bbb imports: remove last ``membrane`` from all\n  ``dexterity.membrane.behavior.membrane*``.\n  [jensens]\n\n- fix: make ``PasswordProvider`` work. The whole was inactive and broken after\n  activation.\n  [jensens]\n\n- Get rid of deprecated plone.directives and use plone core functionality to\n  achieve same goals. Also minor modernization of buildout.\n  [jensens]\n\n- Declare plone.directives.form dependency.\n  [vincentfretin]\n\n\n1.0 (2014-10-16)\n----------------\n\n- add a hook using a utility to add a password checker in own customization\n  code. we may want to provide an default, but yet not sure how it should\n  look like.\n  [jensens]\n\n- make it easier to inherit passowrd for own behavior\n  [jensens]\n\n- Remove grok dependency, refactor a bit to reduce complexity in one module.\n  Attention: password related behaviour is now in own module. Needs update of\n  customizations/own code after upgrade.\n  [jensens]\n\n- Cleanup, pep8, plone-code-style, make tests fly again.\n  [jensens]\n\n- Make get_full_name a method of MembraneUser so it can be easily customized.\n  [cedricmessiant, vincentfretin]\n\n- Add French translations.\n  [cedricmessiant]\n\n0.4 (2013-07-18)\n----------------\n\n- Add upgrade step to update the behavior profile.  If you have\n  installed the example content profile, you will see a warning in the\n  Add-ons control panel that Plone does not know how to update this\n  profile.  We recommend that you deactivate it and then activate it\n  again.  Issue #7\n  [maurits]\n\n- Rename content profile to example and rename behavior profile to\n  default.  Issue #7.\n  [maurits]\n\n- Add Spanish and Brazilian Portuguese translations. [hvelarde]\n\n\n0.3 (2013-05-15)\n----------------\n\n- Fix installation problems when OS does not support symbolic links. Renamed\n  ``README.txt`` to ``README.rst`` and updated ``setup.py`` to point to that\n  file. This fixes #5.\n  [saily]\n\n- Fix getattr in getPropertiesForUser to have a default value.\n  [datakurre]\n\n\n0.2 (2013-02-19)\n----------------\n\n- Keep constistent with plone's email login #12187, so don't lowercase email\n  addresses.\n  [saily]\n\n- Add basic membrane group behavior\n  [saily]\n\n\n0.1 (2012-09-20)\n----------------\n\n- Initial alpha release\n",
    "bugtrack_url": null,
    "license": "GPL",
    "summary": "Dexterity content and behaviors to integrate with membrane.",
    "version": "3.0.2",
    "project_urls": {
        "Homepage": "https://github.com/collective/dexterity.membrane"
    },
    "split_keywords": [
        "plone",
        "dexterity",
        "membrane"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fab04a18f806b3510b1990705a1e2b43cd5ba1e6dc0020ccc226c9c2f16da92e",
                "md5": "c1fa36f5b0e230534adfe88b09cc87c1",
                "sha256": "50e6db6cbdc4c30c1ff37a4eb516f49540fa26afca8ae4af4d1b32aa5239b266"
            },
            "downloads": -1,
            "filename": "dexterity.membrane-3.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "c1fa36f5b0e230534adfe88b09cc87c1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 38625,
            "upload_time": "2023-06-07T06:32:40",
            "upload_time_iso_8601": "2023-06-07T06:32:40.375587Z",
            "url": "https://files.pythonhosted.org/packages/fa/b0/4a18f806b3510b1990705a1e2b43cd5ba1e6dc0020ccc226c9c2f16da92e/dexterity.membrane-3.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-07 06:32:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "collective",
    "github_project": "dexterity.membrane",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "dexterity.membrane"
}
        
Elapsed time: 0.07438s