cone.ugm


Namecone.ugm JSON
Version 1.0a7 PyPI version JSON
download
home_pagehttp://github.com/conestack/cone.ugm
SummaryUser and group management
upload_time2023-02-02 06:43:11
maintainer
docs_urlNone
authorCone Contributors
requires_python
licenseLGPLv3
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            .. image:: https://img.shields.io/pypi/v/cone.ugm.svg
    :target: https://pypi.python.org/pypi/cone.ugm
    :alt: Latest PyPI version

.. image:: https://img.shields.io/pypi/dm/cone.ugm.svg
    :target: https://pypi.python.org/pypi/cone.ugm
    :alt: Number of PyPI downloads

.. image:: https://travis-ci.org/bluedynamics/cone.ugm.svg?branch=master
    :target: https://travis-ci.org/bluedynamics/cone.ugm

.. image:: https://coveralls.io/repos/github/bluedynamics/cone.ugm/badge.svg?branch=master
    :target: https://coveralls.io/github/bluedynamics/cone.ugm?branch=master

Plugin for `cone.app <http://packages.python.org/cone.app>`_ providing a
user and group management UI.


Features
--------

- Users and Groups CRUD
- Principal membership of users and groups
- Roles support
- Local Manager Support
- User and group form configuration


Setup
=====

Prerequirements
---------------

While installation ``lxml`` gets compiled, the required dev headers must be
installed on the system.

On debian based systems install:

.. code-block:: shell

    $ apt-get install -y libxml2-dev libxslt1-dev


Development and Testing
-----------------------

For testing and development, ``cone.ugm`` contains a buildout configuration.
Download or checkout package and run:

.. code-block:: shell

    cone.ugm$ ./bootstrap.sh python3


Example Configuration
---------------------

For testing and demo purposes, an example UGM configuration is contained in the
``cfg`` folder of the source package.

It contains the configuration file ``ugm.xml``, containing the general UGM
configuration and ``localmanager.xml``, containing the configuration about
local users and groups management. These two files can be edited TTW via the
settings UI.

The ``ugm.ini`` file contains the application configuration:

.. code-block:: ini

    [app:ugm]
    ...

    cone.plugins =
        cone.ugm

    ugm.backend = file
    ugm.config = %(here)s/ugm.xml
    ugm.localmanager_config = %(here)s/localmanager.xml

    ugm.users_file = %(here)s/../parts/ugm/users
    ugm.groups_file = %(here)s/../parts/ugm/groups
    ugm.roles_file = %(here)s/../parts/ugm/roles
    ugm.datadir = %(here)s/../parts/ugm/data

    ...

In this example the ``file`` backend is configured as UGM backend. For
configuring SQL or LDAP based backends, see documentation at ``cone.sql``
respective ``cone.ldap``.

Start the application:

.. code-block:: shell

    cone.ugm$ ./bin/pserver cfg/ugm.ini

and browse ``http://localhost:8081/``. Default ``admin`` user password is
``admin``.


Configuration and Customization
===============================

General
-------

For customizing the plugin, make an integration package and include it in
your setup.


Roles
-----

``cone.ugm`` internally uses 3 roles in order to permit user actions.

``editor`` is permitted to manage membership, ``admin`` additionally is
permitted to add, edit and delete users and groups, and ``manager`` is a
superuser. If UGM is the only plugin used, you can reduce the available roles
to this three:

.. code-block:: python

    cone.app.security.DEFAULT_ROLES = [
        ('editor', 'Editor'),
        ('admin', 'Admin'),
        ('manager', 'Manager')
    ]


Principal Forms
---------------

The basic principal form customization happens in the ugm XML configuration
file. Each field to render must have an entry in ``users_form_attrmap``
respective ``groups_form_attrmap``:

.. code-block:: xml

  <users_form_attrmap>
    <elem>
      <key>my_field</key>
      <value>My Field</value>
    </elem>
  </users_form_attrmap>

By default, a non required text field gets rendered for each custom entry in
the XML configuration.

To make a custom field required, the easiest way is to use
``default_form_field_factory`` and register it with ``user_field``
respective ``group_field``:

.. code-block:: python

    from cone.ugm.browser.principal import default_form_field_factory
    from cone.ugm.browser.principal import user_field
    from functools import partial

    my_field_factory = user_field('my_field')(
        partial(default_form_field_factory, required=True)
    )

It's possible to register custom principal field factories for dedicated
UGM backends. This example is taken from ``cone.ldap`` and registers a
user field factory for ``cn`` attribute in ``ldap`` backend:

.. code-block:: python

    ldap_cn_field_factory = user_field('cn', backend='ldap')(
        partial(default_form_field_factory, required=True)
    )

The most flexible way for principal form field customization is to provide
a callback function and call the yafowil factory directly:

.. code-block:: python

    from yafowil.base import factory

    @user_field('age')
    def age_field_factory(form, label, value):
        return factory(
            'field:label:error:number',
            value=value,
            props={
                'label': label,
                'datatype': int
            })

Note. The value of the custom field gets written to principal attributes as
extracted from the widget. Make sure to define the expected datatype in the
widget properties or define a suitable custom extractor.


Principal Listings
------------------

XXX


Object Events
=============

You can react to creation, modification and deletion of users and groups by
binding to the given event classes.

These events are fired when the user manipulations are done in the UGM 
management forms.

necessary imports:

.. code-block:: python

    from zope.event import classhandler
    from cone.ugm import events


Defining the event handlers
---------------------------

for users:

.. code-block:: python

    @classhandler.handler(events.UserCreatedEvent)
    def on_user_created(event):
        print(f"user {event.principal} with id {event.principal.name} created")

    @classhandler.handler(events.UserModifiedEvent)
    def on_user_modified(event):
        print(f"user {event.principal} with id {event.principal.name} modified")

    @classhandler.handler(events.UserDeletedEvent)
    def on_user_deleted(event):
        print(f"user {event.principal} with id {event.principal.name} deleted")

and for groups:

.. code-block:: python

    @classhandler.handler(events.GroupCreatedEvent)
    def on_group_created(event):
        print(f"group {event.principal} with id {event.principal.name} created")

    @classhandler.handler(events.GroupModifiedEvent)
    def on_group_modified(event):
        print(f"group {event.principal} with id {event.principal.name} modified")

    @classhandler.handler(events.GroupDeletedEvent)
    def on_group_deleted(event):
        print(f"group {event.principal} with id {event.principal.name} deleted")


Contributors
============

- Robert Niederreiter (Author)
- Florian Friesdorf
- Jens Klein


Changes
=======

1.0a7 (2023-02-02)
------------------

- Catch ``AttributeError`` in ``model.user.User.expires``. Happens in user add
  form where user not exists yet.
  [rnix]


1.0a6 (2022-12-05)
------------------

- Remove ``expiration`` yafowil blueprint from ``cone.ugm.browser.expires``.
  Account expiration is now done with a regular date field since UGM backends
  allow setting ``expires`` attributes as datetime objects as of node.ext.ugm
  1.1.
  [rnix]

- Move ``users_expires_attr`` and ``users_expires_unit`` settings to cone.ldap,
  since they always have been used only for LDAP UGM backend.
  [rnix]

- Expose ``expires`` attribute of backend user in ``cone.ugm.model.User``.
  [rnix]

- Fix general settings form according to changes in yafowil 3.0.
  [rnix]


1.0a5 (2022-10-06)
------------------

- Replace deprecated use of ``Nodify`` by ``MappingNode``.
  [rnix]


1.0a4 (2021-11-08)
------------------

- Adopt import path of ``safe_decode`` and ``node_path``.
  [rnix]


1.0a3 (2021-10-25)
------------------

- Fix ``UsersListing`` and ``GroupsListing`` search filter to ignore
  ``None`` values.

- Increase listing slice size to 15.
  [rnix]

- Add ``change_password`` form.
  [rnix]

- Add support for objects events on user and group add/modify/delete.
  [zworkb]


1.0a2 (2020-11-12)
------------------

- Fix delete principal.
  [rnix]


1.0a1 (2020-07-09)
------------------

- Use ``ContentAddForm`` and ``ContentEditForm`` behaviors instead of B/C
  ``AddBehavior`` and ``EditBehavior`` for user and group form.
  [rnix]

- Use ``layout_config`` decorator introduced in ``cone.app 1.0rc1``.
  [rnix]

- Remove ``cone.ugm.model.users.users_factory`` and
  ``cone.ugm.model.groups.groups_factory``. Register related node classes
  directly as app entries.
  [rnix]

- Bind UGM columns content view to UGM models.
  [rnix]

- Move LDAP related code to ``cone.ldap``.
  [rnix]

- Users autoincrement start setting value may be empty in config.
  [rnix]

- Do not remember users and groups on volatile storage.
  [rnix]

- Use ``IUgm.invalidate`` for invalidation of users and groups on UGM backend.
  [rnix]

- Rename ``cone.ugm.browser.listing.ColumnListing.query_items`` to
  ``listing_items``.
  [rnix]

- Turn ``cone.ugm.browser.group.Users`` and ``cone.ugm.browser.user.Groups``
  property descriptors into ``ColumnListing`` deriving tiles.
  [rnix]

- Remove superfluous ``jQuery.sortElements.js`` and ``naturalSort.js``.
  [rnix]

- Move plugin config code inside main hook function.
  [rnix]

- Python 3 Support.
  [rnix]

- Convert doctests to unittests.
  [rnix]

- Use ``cone.app.ugm.ugm_backend`` instead of ``cone.app.cfg.auth``.
  [rnix]

- Use ``cone.tile.tile`` decorator instead of ``cone.tile.registerTile``.
  [rnix]

- Use ``request.has_permission`` instead of ``pyramid.security.has_permission``.
  [rnix]

- Remove inout widget. Listing widget is the only principal membership now.
  Remove corresponding ``default_membership_assignment_widget``,
  ``user_display_name_attribute`` and ``group_display_name_attribute`` from
  settings
  [rnix]

- Change UI. Principal form and principal membership are not displayed
  in right column together any more. When viewing a principals content, left
  column displays the listing and right column the principal form. When
  viewing a principal, left column displays the principal form and right
  column displays the principal membership.
  [rnix]

- Update to cone.app >= 1.0.
  [rnix]

- Change license to LGPLv3.
  [rnix]


0.9.7
-----

- Directly depend on ``lxml`` in ``setup.py``
  [rnix, 2014-05-13]


0.9.6
-----

- Adopt dependencies.
  [rnix, 2013-01-10]


0.9.5
-----

- Portrait CSS fix.
  [rnix, 2012-10-30]

- Python 2.7 Support.
  [rnix, 2012-10-16]

- adopt to ``cone.app`` 0.9.4
  [rnix, 2012-07-29]

- adopt to ``node`` 0.9.8
  [rnix, 2012-07-29]

- adopt to ``plumber`` 1.2
  [rnix, 2012-07-29]

- Simplify ``cone.ugm.browser.actions``.
  [rnix, 2012-07-26]

- Add local manager functionality.
  [rnix, 2012-07-25]


0.9.4
-----

- Get rid of BBB classes usage from ``cone.app``.
  [rnix, 2012-05-18]

- Fix invalidation after settings form save.
  [rnix, 2012-04-23]

- Portrait Image support.
  [rnix, 2012-04-21]

- Configuration for attributes exposed to attribute map.
  [rnix, 2012-04-19]

- Invalidate after creating principal or roles container.
  [rnix, 2012-04-19]

- Adopt ``expires`` blueprint to ``yafowil.widget.datetime`` 1.3.
  [rnix, 2012-04-19]


0.9.3
-----

- Add Autoincrement Feature for user ids.
  [rnix, 2012-03-30]


0.9.2
-----

- Account expiration widget improvements.
  [rnix, 2012-03-20]


0.9.1
-----

- Add account expiration functionality.
  [rnix, 2011-03-06]

- Make display field of In-Out widget configurable.
  [rnix, 2011-01-31]

- Dynamic width CSS.
  [rnix, 2011-12-18]

- Get rid of global ``cone.ugm.backend``. ``cone.app.cfg.auth`` is returend
  by ``cone.ugm.model.utils.ugm_backend``.
  [rnix, 2011-11-22]

- Explicit names for settings forms.
  [rnix, 2011-11-18]

- Add node properties for users and groups to get displayed in navtree if
  displayed.
  [rnix, 2011-11-16]


0.9
---

- Initial release.


License
=======

GNU LESSER GENERAL PUBLIC LICENSE

Version 3, 29 June 2007

Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/>

Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.

This version of the GNU Lesser General Public License incorporates the terms
and conditions of version 3 of the GNU General Public License, supplemented
by the additional permissions listed below.

0. Additional Definitions.

As used herein, “this License” refers to version 3 of the GNU Lesser General
Public License, and the “GNU GPL” refers to version 3 of the GNU General
Public License.

“The Library” refers to a covered work governed by this License, other than
an Application or a Combined Work as defined below.

An “Application” is any work that makes use of an interface provided by the
Library, but which is not otherwise based on the Library. Defining a
subclass of a class defined by the Library is deemed a mode of using an
interface provided by the Library.

A “Combined Work” is a work produced by combining or linking an Application
with the Library. The particular version of the Library with which the Combined
Work was made is also called the “Linked Version”.

The “Minimal Corresponding Source” for a Combined Work means the Corresponding
Source for the Combined Work, excluding any source code for portions of the
Combined Work that, considered in isolation, are based on the Application,
and not on the Linked Version.

The “Corresponding Application Code” for a Combined Work means the object code
and/or source code for the Application, including any data and utility programs
needed for reproducing the Combined Work from the Application, but excluding
the System Libraries of the Combined Work.

1. Exception to Section 3 of the GNU GPL.

You may convey a covered work under sections 3 and 4 of this License without
being bound by section 3 of the GNU GPL.

2. Conveying Modified Versions.

If you modify a copy of the Library, and, in your modifications, a facility
refers to a function or data to be supplied by an Application that uses the
facility (other than as an argument passed when the facility is invoked),
then you may convey a copy of the modified version:

    a) under this License, provided that you make a good faith effort to
       ensure that, in the event an Application does not supply the function
       or data, the facility still operates, and performs whatever part of its
       purpose remains meaningful, or

    b) under the GNU GPL, with none of the additional permissions of this
       License applicable to that copy.

3. Object Code Incorporating Material from Library Header Files.

The object code form of an Application may incorporate material from a header
file that is part of the Library. You may convey such object code under terms
of your choice, provided that, if the incorporated material is not limited to
numerical parameters, data structure layouts and accessors, or small macros,
inline functions and templates (ten or fewer lines in length), you do both of
the following:

    a) Give prominent notice with each copy of the object code that the Library
       is used in it and that the Library and its use are covered by this
       License.

    b) Accompany the object code with a copy of the GNU GPL and this license
       document.

4. Combined Works.

You may convey a Combined Work under terms of your choice that, taken together,
effectively do not restrict modification of the portions of the Library
contained in the Combined Work and reverse engineering for debugging such
modifications, if you also do each of the following:

    a) Give prominent notice with each copy of the Combined Work that the
       Library is used in it and that the Library and its use are covered by
       this License.

    b) Accompany the Combined Work with a copy of the GNU GPL and this license
       document.

    c) For a Combined Work that displays copyright notices during execution,
       include the copyright notice for the Library among these notices, as
       well as a reference directing the user to the copies of the GNU GPL and
       this license document.

    d) Do one of the following:

        0) Convey the Minimal Corresponding Source under the terms of this
           License, and the Corresponding Application Code in a form suitable
           for, and under terms that permit, the user to recombine or relink
           the Application with a modified version of the Linked Version to
           produce a modified Combined Work, in the manner specified by section
           6 of the GNU GPL for conveying Corresponding Source.

        1) Use a suitable shared library mechanism for linking with the
           Library. A suitable mechanism is one that (a) uses at run time a
           copy of the Library already present on the user's computer system,
           and (b) will operate properly with a modified version of the Library
           that is interface-compatible with the Linked Version.

    e) Provide Installation Information, but only if you would otherwise be
       required to provide such information under section 6 of the GNU GPL,
       and only to the extent that such information is necessary to install
       and execute a modified version of the Combined Work produced by
       recombining or relinking the Application with a modified version of the
       Linked Version. (If you use option 4d0, the Installation Information
       must accompany the Minimal Corresponding Source and Corresponding
       Application Code. If you use option 4d1, you must provide the
       Installation Information in the manner specified by section 6 of the
       GNU GPL for conveying Corresponding Source.)

5. Combined Libraries.

You may place library facilities that are a work based on the Library side by
side in a single library together with other library facilities that are not
Applications and are not covered by this License, and convey such a combined
library under terms of your choice, if you do both of the following:

    a) Accompany the combined library with a copy of the same work based on the
       Library, uncombined with any other library facilities, conveyed under the
       terms of this License.

    b) Give prominent notice with the combined library that part of it is a
       work based on the Library, and explaining where to find the accompanying
       uncombined form of the same work.

6. Revised Versions of the GNU Lesser General Public License.

The Free Software Foundation may publish revised and/or new versions of the
GNU Lesser General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number. If the Library as you
received it specifies that a certain numbered version of the GNU Lesser General
Public License “or any later version” applies to it, you have the option of
following the terms and conditions either of that published version or of any
later version published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser General Public
License, you may choose any version of the GNU Lesser General Public License
ever published by the Free Software Foundation.

If the Library as you received it specifies that a proxy can decide whether
future versions of the GNU Lesser General Public License shall apply, that
proxy's public statement of acceptance of any version is permanent
authorization for you to choose that version for the Library.



            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/conestack/cone.ugm",
    "name": "cone.ugm",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Cone Contributors",
    "author_email": "dev@conestack.org",
    "download_url": "https://files.pythonhosted.org/packages/6b/66/221fa2737a8fd20c631f2a69498209e366d42290582c5be94aba24502b7d/cone.ugm-1.0a7.tar.gz",
    "platform": null,
    "description": ".. image:: https://img.shields.io/pypi/v/cone.ugm.svg\n    :target: https://pypi.python.org/pypi/cone.ugm\n    :alt: Latest PyPI version\n\n.. image:: https://img.shields.io/pypi/dm/cone.ugm.svg\n    :target: https://pypi.python.org/pypi/cone.ugm\n    :alt: Number of PyPI downloads\n\n.. image:: https://travis-ci.org/bluedynamics/cone.ugm.svg?branch=master\n    :target: https://travis-ci.org/bluedynamics/cone.ugm\n\n.. image:: https://coveralls.io/repos/github/bluedynamics/cone.ugm/badge.svg?branch=master\n    :target: https://coveralls.io/github/bluedynamics/cone.ugm?branch=master\n\nPlugin for `cone.app <http://packages.python.org/cone.app>`_ providing a\nuser and group management UI.\n\n\nFeatures\n--------\n\n- Users and Groups CRUD\n- Principal membership of users and groups\n- Roles support\n- Local Manager Support\n- User and group form configuration\n\n\nSetup\n=====\n\nPrerequirements\n---------------\n\nWhile installation ``lxml`` gets compiled, the required dev headers must be\ninstalled on the system.\n\nOn debian based systems install:\n\n.. code-block:: shell\n\n    $ apt-get install -y libxml2-dev libxslt1-dev\n\n\nDevelopment and Testing\n-----------------------\n\nFor testing and development, ``cone.ugm`` contains a buildout configuration.\nDownload or checkout package and run:\n\n.. code-block:: shell\n\n    cone.ugm$ ./bootstrap.sh python3\n\n\nExample Configuration\n---------------------\n\nFor testing and demo purposes, an example UGM configuration is contained in the\n``cfg`` folder of the source package.\n\nIt contains the configuration file ``ugm.xml``, containing the general UGM\nconfiguration and ``localmanager.xml``, containing the configuration about\nlocal users and groups management. These two files can be edited TTW via the\nsettings UI.\n\nThe ``ugm.ini`` file contains the application configuration:\n\n.. code-block:: ini\n\n    [app:ugm]\n    ...\n\n    cone.plugins =\n        cone.ugm\n\n    ugm.backend = file\n    ugm.config = %(here)s/ugm.xml\n    ugm.localmanager_config = %(here)s/localmanager.xml\n\n    ugm.users_file = %(here)s/../parts/ugm/users\n    ugm.groups_file = %(here)s/../parts/ugm/groups\n    ugm.roles_file = %(here)s/../parts/ugm/roles\n    ugm.datadir = %(here)s/../parts/ugm/data\n\n    ...\n\nIn this example the ``file`` backend is configured as UGM backend. For\nconfiguring SQL or LDAP based backends, see documentation at ``cone.sql``\nrespective ``cone.ldap``.\n\nStart the application:\n\n.. code-block:: shell\n\n    cone.ugm$ ./bin/pserver cfg/ugm.ini\n\nand browse ``http://localhost:8081/``. Default ``admin`` user password is\n``admin``.\n\n\nConfiguration and Customization\n===============================\n\nGeneral\n-------\n\nFor customizing the plugin, make an integration package and include it in\nyour setup.\n\n\nRoles\n-----\n\n``cone.ugm`` internally uses 3 roles in order to permit user actions.\n\n``editor`` is permitted to manage membership, ``admin`` additionally is\npermitted to add, edit and delete users and groups, and ``manager`` is a\nsuperuser. If UGM is the only plugin used, you can reduce the available roles\nto this three:\n\n.. code-block:: python\n\n    cone.app.security.DEFAULT_ROLES = [\n        ('editor', 'Editor'),\n        ('admin', 'Admin'),\n        ('manager', 'Manager')\n    ]\n\n\nPrincipal Forms\n---------------\n\nThe basic principal form customization happens in the ugm XML configuration\nfile. Each field to render must have an entry in ``users_form_attrmap``\nrespective ``groups_form_attrmap``:\n\n.. code-block:: xml\n\n  <users_form_attrmap>\n    <elem>\n      <key>my_field</key>\n      <value>My Field</value>\n    </elem>\n  </users_form_attrmap>\n\nBy default, a non required text field gets rendered for each custom entry in\nthe XML configuration.\n\nTo make a custom field required, the easiest way is to use\n``default_form_field_factory`` and register it with ``user_field``\nrespective ``group_field``:\n\n.. code-block:: python\n\n    from cone.ugm.browser.principal import default_form_field_factory\n    from cone.ugm.browser.principal import user_field\n    from functools import partial\n\n    my_field_factory = user_field('my_field')(\n        partial(default_form_field_factory, required=True)\n    )\n\nIt's possible to register custom principal field factories for dedicated\nUGM backends. This example is taken from ``cone.ldap`` and registers a\nuser field factory for ``cn`` attribute in ``ldap`` backend:\n\n.. code-block:: python\n\n    ldap_cn_field_factory = user_field('cn', backend='ldap')(\n        partial(default_form_field_factory, required=True)\n    )\n\nThe most flexible way for principal form field customization is to provide\na callback function and call the yafowil factory directly:\n\n.. code-block:: python\n\n    from yafowil.base import factory\n\n    @user_field('age')\n    def age_field_factory(form, label, value):\n        return factory(\n            'field:label:error:number',\n            value=value,\n            props={\n                'label': label,\n                'datatype': int\n            })\n\nNote. The value of the custom field gets written to principal attributes as\nextracted from the widget. Make sure to define the expected datatype in the\nwidget properties or define a suitable custom extractor.\n\n\nPrincipal Listings\n------------------\n\nXXX\n\n\nObject Events\n=============\n\nYou can react to creation, modification and deletion of users and groups by\nbinding to the given event classes.\n\nThese events are fired when the user manipulations are done in the UGM \nmanagement forms.\n\nnecessary imports:\n\n.. code-block:: python\n\n    from zope.event import classhandler\n    from cone.ugm import events\n\n\nDefining the event handlers\n---------------------------\n\nfor users:\n\n.. code-block:: python\n\n    @classhandler.handler(events.UserCreatedEvent)\n    def on_user_created(event):\n        print(f\"user {event.principal} with id {event.principal.name} created\")\n\n    @classhandler.handler(events.UserModifiedEvent)\n    def on_user_modified(event):\n        print(f\"user {event.principal} with id {event.principal.name} modified\")\n\n    @classhandler.handler(events.UserDeletedEvent)\n    def on_user_deleted(event):\n        print(f\"user {event.principal} with id {event.principal.name} deleted\")\n\nand for groups:\n\n.. code-block:: python\n\n    @classhandler.handler(events.GroupCreatedEvent)\n    def on_group_created(event):\n        print(f\"group {event.principal} with id {event.principal.name} created\")\n\n    @classhandler.handler(events.GroupModifiedEvent)\n    def on_group_modified(event):\n        print(f\"group {event.principal} with id {event.principal.name} modified\")\n\n    @classhandler.handler(events.GroupDeletedEvent)\n    def on_group_deleted(event):\n        print(f\"group {event.principal} with id {event.principal.name} deleted\")\n\n\nContributors\n============\n\n- Robert Niederreiter (Author)\n- Florian Friesdorf\n- Jens Klein\n\n\nChanges\n=======\n\n1.0a7 (2023-02-02)\n------------------\n\n- Catch ``AttributeError`` in ``model.user.User.expires``. Happens in user add\n  form where user not exists yet.\n  [rnix]\n\n\n1.0a6 (2022-12-05)\n------------------\n\n- Remove ``expiration`` yafowil blueprint from ``cone.ugm.browser.expires``.\n  Account expiration is now done with a regular date field since UGM backends\n  allow setting ``expires`` attributes as datetime objects as of node.ext.ugm\n  1.1.\n  [rnix]\n\n- Move ``users_expires_attr`` and ``users_expires_unit`` settings to cone.ldap,\n  since they always have been used only for LDAP UGM backend.\n  [rnix]\n\n- Expose ``expires`` attribute of backend user in ``cone.ugm.model.User``.\n  [rnix]\n\n- Fix general settings form according to changes in yafowil 3.0.\n  [rnix]\n\n\n1.0a5 (2022-10-06)\n------------------\n\n- Replace deprecated use of ``Nodify`` by ``MappingNode``.\n  [rnix]\n\n\n1.0a4 (2021-11-08)\n------------------\n\n- Adopt import path of ``safe_decode`` and ``node_path``.\n  [rnix]\n\n\n1.0a3 (2021-10-25)\n------------------\n\n- Fix ``UsersListing`` and ``GroupsListing`` search filter to ignore\n  ``None`` values.\n\n- Increase listing slice size to 15.\n  [rnix]\n\n- Add ``change_password`` form.\n  [rnix]\n\n- Add support for objects events on user and group add/modify/delete.\n  [zworkb]\n\n\n1.0a2 (2020-11-12)\n------------------\n\n- Fix delete principal.\n  [rnix]\n\n\n1.0a1 (2020-07-09)\n------------------\n\n- Use ``ContentAddForm`` and ``ContentEditForm`` behaviors instead of B/C\n  ``AddBehavior`` and ``EditBehavior`` for user and group form.\n  [rnix]\n\n- Use ``layout_config`` decorator introduced in ``cone.app 1.0rc1``.\n  [rnix]\n\n- Remove ``cone.ugm.model.users.users_factory`` and\n  ``cone.ugm.model.groups.groups_factory``. Register related node classes\n  directly as app entries.\n  [rnix]\n\n- Bind UGM columns content view to UGM models.\n  [rnix]\n\n- Move LDAP related code to ``cone.ldap``.\n  [rnix]\n\n- Users autoincrement start setting value may be empty in config.\n  [rnix]\n\n- Do not remember users and groups on volatile storage.\n  [rnix]\n\n- Use ``IUgm.invalidate`` for invalidation of users and groups on UGM backend.\n  [rnix]\n\n- Rename ``cone.ugm.browser.listing.ColumnListing.query_items`` to\n  ``listing_items``.\n  [rnix]\n\n- Turn ``cone.ugm.browser.group.Users`` and ``cone.ugm.browser.user.Groups``\n  property descriptors into ``ColumnListing`` deriving tiles.\n  [rnix]\n\n- Remove superfluous ``jQuery.sortElements.js`` and ``naturalSort.js``.\n  [rnix]\n\n- Move plugin config code inside main hook function.\n  [rnix]\n\n- Python 3 Support.\n  [rnix]\n\n- Convert doctests to unittests.\n  [rnix]\n\n- Use ``cone.app.ugm.ugm_backend`` instead of ``cone.app.cfg.auth``.\n  [rnix]\n\n- Use ``cone.tile.tile`` decorator instead of ``cone.tile.registerTile``.\n  [rnix]\n\n- Use ``request.has_permission`` instead of ``pyramid.security.has_permission``.\n  [rnix]\n\n- Remove inout widget. Listing widget is the only principal membership now.\n  Remove corresponding ``default_membership_assignment_widget``,\n  ``user_display_name_attribute`` and ``group_display_name_attribute`` from\n  settings\n  [rnix]\n\n- Change UI. Principal form and principal membership are not displayed\n  in right column together any more. When viewing a principals content, left\n  column displays the listing and right column the principal form. When\n  viewing a principal, left column displays the principal form and right\n  column displays the principal membership.\n  [rnix]\n\n- Update to cone.app >= 1.0.\n  [rnix]\n\n- Change license to LGPLv3.\n  [rnix]\n\n\n0.9.7\n-----\n\n- Directly depend on ``lxml`` in ``setup.py``\n  [rnix, 2014-05-13]\n\n\n0.9.6\n-----\n\n- Adopt dependencies.\n  [rnix, 2013-01-10]\n\n\n0.9.5\n-----\n\n- Portrait CSS fix.\n  [rnix, 2012-10-30]\n\n- Python 2.7 Support.\n  [rnix, 2012-10-16]\n\n- adopt to ``cone.app`` 0.9.4\n  [rnix, 2012-07-29]\n\n- adopt to ``node`` 0.9.8\n  [rnix, 2012-07-29]\n\n- adopt to ``plumber`` 1.2\n  [rnix, 2012-07-29]\n\n- Simplify ``cone.ugm.browser.actions``.\n  [rnix, 2012-07-26]\n\n- Add local manager functionality.\n  [rnix, 2012-07-25]\n\n\n0.9.4\n-----\n\n- Get rid of BBB classes usage from ``cone.app``.\n  [rnix, 2012-05-18]\n\n- Fix invalidation after settings form save.\n  [rnix, 2012-04-23]\n\n- Portrait Image support.\n  [rnix, 2012-04-21]\n\n- Configuration for attributes exposed to attribute map.\n  [rnix, 2012-04-19]\n\n- Invalidate after creating principal or roles container.\n  [rnix, 2012-04-19]\n\n- Adopt ``expires`` blueprint to ``yafowil.widget.datetime`` 1.3.\n  [rnix, 2012-04-19]\n\n\n0.9.3\n-----\n\n- Add Autoincrement Feature for user ids.\n  [rnix, 2012-03-30]\n\n\n0.9.2\n-----\n\n- Account expiration widget improvements.\n  [rnix, 2012-03-20]\n\n\n0.9.1\n-----\n\n- Add account expiration functionality.\n  [rnix, 2011-03-06]\n\n- Make display field of In-Out widget configurable.\n  [rnix, 2011-01-31]\n\n- Dynamic width CSS.\n  [rnix, 2011-12-18]\n\n- Get rid of global ``cone.ugm.backend``. ``cone.app.cfg.auth`` is returend\n  by ``cone.ugm.model.utils.ugm_backend``.\n  [rnix, 2011-11-22]\n\n- Explicit names for settings forms.\n  [rnix, 2011-11-18]\n\n- Add node properties for users and groups to get displayed in navtree if\n  displayed.\n  [rnix, 2011-11-16]\n\n\n0.9\n---\n\n- Initial release.\n\n\nLicense\n=======\n\nGNU LESSER GENERAL PUBLIC LICENSE\n\nVersion 3, 29 June 2007\n\nCopyright \u00a9 2007 Free Software Foundation, Inc. <https://fsf.org/>\n\nEveryone is permitted to copy and distribute verbatim copies of this license\ndocument, but changing it is not allowed.\n\nThis version of the GNU Lesser General Public License incorporates the terms\nand conditions of version 3 of the GNU General Public License, supplemented\nby the additional permissions listed below.\n\n0. Additional Definitions.\n\nAs used herein, \u201cthis License\u201d refers to version 3 of the GNU Lesser General\nPublic License, and the \u201cGNU GPL\u201d refers to version 3 of the GNU General\nPublic License.\n\n\u201cThe Library\u201d refers to a covered work governed by this License, other than\nan Application or a Combined Work as defined below.\n\nAn \u201cApplication\u201d is any work that makes use of an interface provided by the\nLibrary, but which is not otherwise based on the Library. Defining a\nsubclass of a class defined by the Library is deemed a mode of using an\ninterface provided by the Library.\n\nA \u201cCombined Work\u201d is a work produced by combining or linking an Application\nwith the Library. The particular version of the Library with which the Combined\nWork was made is also called the \u201cLinked Version\u201d.\n\nThe \u201cMinimal Corresponding Source\u201d for a Combined Work means the Corresponding\nSource for the Combined Work, excluding any source code for portions of the\nCombined Work that, considered in isolation, are based on the Application,\nand not on the Linked Version.\n\nThe \u201cCorresponding Application Code\u201d for a Combined Work means the object code\nand/or source code for the Application, including any data and utility programs\nneeded for reproducing the Combined Work from the Application, but excluding\nthe System Libraries of the Combined Work.\n\n1. Exception to Section 3 of the GNU GPL.\n\nYou may convey a covered work under sections 3 and 4 of this License without\nbeing bound by section 3 of the GNU GPL.\n\n2. Conveying Modified Versions.\n\nIf you modify a copy of the Library, and, in your modifications, a facility\nrefers to a function or data to be supplied by an Application that uses the\nfacility (other than as an argument passed when the facility is invoked),\nthen you may convey a copy of the modified version:\n\n    a) under this License, provided that you make a good faith effort to\n       ensure that, in the event an Application does not supply the function\n       or data, the facility still operates, and performs whatever part of its\n       purpose remains meaningful, or\n\n    b) under the GNU GPL, with none of the additional permissions of this\n       License applicable to that copy.\n\n3. Object Code Incorporating Material from Library Header Files.\n\nThe object code form of an Application may incorporate material from a header\nfile that is part of the Library. You may convey such object code under terms\nof your choice, provided that, if the incorporated material is not limited to\nnumerical parameters, data structure layouts and accessors, or small macros,\ninline functions and templates (ten or fewer lines in length), you do both of\nthe following:\n\n    a) Give prominent notice with each copy of the object code that the Library\n       is used in it and that the Library and its use are covered by this\n       License.\n\n    b) Accompany the object code with a copy of the GNU GPL and this license\n       document.\n\n4. Combined Works.\n\nYou may convey a Combined Work under terms of your choice that, taken together,\neffectively do not restrict modification of the portions of the Library\ncontained in the Combined Work and reverse engineering for debugging such\nmodifications, if you also do each of the following:\n\n    a) Give prominent notice with each copy of the Combined Work that the\n       Library is used in it and that the Library and its use are covered by\n       this License.\n\n    b) Accompany the Combined Work with a copy of the GNU GPL and this license\n       document.\n\n    c) For a Combined Work that displays copyright notices during execution,\n       include the copyright notice for the Library among these notices, as\n       well as a reference directing the user to the copies of the GNU GPL and\n       this license document.\n\n    d) Do one of the following:\n\n        0) Convey the Minimal Corresponding Source under the terms of this\n           License, and the Corresponding Application Code in a form suitable\n           for, and under terms that permit, the user to recombine or relink\n           the Application with a modified version of the Linked Version to\n           produce a modified Combined Work, in the manner specified by section\n           6 of the GNU GPL for conveying Corresponding Source.\n\n        1) Use a suitable shared library mechanism for linking with the\n           Library. A suitable mechanism is one that (a) uses at run time a\n           copy of the Library already present on the user's computer system,\n           and (b) will operate properly with a modified version of the Library\n           that is interface-compatible with the Linked Version.\n\n    e) Provide Installation Information, but only if you would otherwise be\n       required to provide such information under section 6 of the GNU GPL,\n       and only to the extent that such information is necessary to install\n       and execute a modified version of the Combined Work produced by\n       recombining or relinking the Application with a modified version of the\n       Linked Version. (If you use option 4d0, the Installation Information\n       must accompany the Minimal Corresponding Source and Corresponding\n       Application Code. If you use option 4d1, you must provide the\n       Installation Information in the manner specified by section 6 of the\n       GNU GPL for conveying Corresponding Source.)\n\n5. Combined Libraries.\n\nYou may place library facilities that are a work based on the Library side by\nside in a single library together with other library facilities that are not\nApplications and are not covered by this License, and convey such a combined\nlibrary under terms of your choice, if you do both of the following:\n\n    a) Accompany the combined library with a copy of the same work based on the\n       Library, uncombined with any other library facilities, conveyed under the\n       terms of this License.\n\n    b) Give prominent notice with the combined library that part of it is a\n       work based on the Library, and explaining where to find the accompanying\n       uncombined form of the same work.\n\n6. Revised Versions of the GNU Lesser General Public License.\n\nThe Free Software Foundation may publish revised and/or new versions of the\nGNU Lesser General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\nEach version is given a distinguishing version number. If the Library as you\nreceived it specifies that a certain numbered version of the GNU Lesser General\nPublic License \u201cor any later version\u201d applies to it, you have the option of\nfollowing the terms and conditions either of that published version or of any\nlater version published by the Free Software Foundation. If the Library as you\nreceived it does not specify a version number of the GNU Lesser General Public\nLicense, you may choose any version of the GNU Lesser General Public License\never published by the Free Software Foundation.\n\nIf the Library as you received it specifies that a proxy can decide whether\nfuture versions of the GNU Lesser General Public License shall apply, that\nproxy's public statement of acceptance of any version is permanent\nauthorization for you to choose that version for the Library.\n\n\n",
    "bugtrack_url": null,
    "license": "LGPLv3",
    "summary": "User and group management",
    "version": "1.0a7",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d1a47310894b39145ab790b0f765163f89345a33c8ef01149b93d6326d9117e1",
                "md5": "6b257a610cbbed8fc09ded1af6249ab5",
                "sha256": "db0924002f41e495341af581a6df25eb8810cee0054a850041e4af6b5c01556e"
            },
            "downloads": -1,
            "filename": "cone.ugm-1.0a7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6b257a610cbbed8fc09ded1af6249ab5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 100504,
            "upload_time": "2023-02-02T06:43:08",
            "upload_time_iso_8601": "2023-02-02T06:43:08.314993Z",
            "url": "https://files.pythonhosted.org/packages/d1/a4/7310894b39145ab790b0f765163f89345a33c8ef01149b93d6326d9117e1/cone.ugm-1.0a7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6b66221fa2737a8fd20c631f2a69498209e366d42290582c5be94aba24502b7d",
                "md5": "0baf091ad6014276189ee6e84696eedf",
                "sha256": "8e61fb5102a770a3f0a54ff879d8d4495d26eafef156aa5850f82aea4e23168c"
            },
            "downloads": -1,
            "filename": "cone.ugm-1.0a7.tar.gz",
            "has_sig": false,
            "md5_digest": "0baf091ad6014276189ee6e84696eedf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 77799,
            "upload_time": "2023-02-02T06:43:11",
            "upload_time_iso_8601": "2023-02-02T06:43:11.175653Z",
            "url": "https://files.pythonhosted.org/packages/6b/66/221fa2737a8fd20c631f2a69498209e366d42290582c5be94aba24502b7d/cone.ugm-1.0a7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-02 06:43:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "conestack",
    "github_project": "cone.ugm",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "lcname": "cone.ugm"
}
        
Elapsed time: 0.07661s