{ "info": { "author": "Martin Aspeli", "author_email": "optilude@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: Plone", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Introduction\n============\n\nThis is a PAS plugin that makes it possible to create groups \"on the fly\" for \nusers via subscription adapters and utilities.\n\nThe plugin can be installed using a GenericSetup extension profile.\n\nFor example, say you have an LDAP repository where a user property contains a\nuser's business unit. If this is mapped as a user property, you can write a \nsubscription adapter that adapts the user to ISuperGroups. It would look up\nthis property on a user and return a list of group ids that corresponds to the \nvalue of the property. When Plone lists a user's groups or assigns roles based \non a user's groups, the user will appear to be a member of this group.\n\nFor example::\n\n from zope.interface import implements\n from zope.component import adapts\n \n from borg.supergroup.interfaces import ISuperGroups\n from Products.PluggableAuthService.interfaces.authservice import IBasicUser\n \n class ImpliedGroups(object):\n implements(ISuperGroups)\n adapts(IBasicUser)\n \n def __init__(self, context):\n self.principal = context\n \n def __call__(self):\n implied = self.principal.getProperty('implied_group', '')\n if implied:\n yield implied\n\nThis can be registered in ZCML with::\n\n \n\nThis is a simple example that looks for an implied group in the \n'implied_groups' user property. Of course, you could source the group(s) from\nwherever you want. The return value should be an iterable (here we use a \ngenerator).\n\nTo make implied groups show up in general group listings (e.g. on the \n'Sharing' tab in the Plone user interface), you could write a named utility \nproviding ISuperGroupsEnumeration. This will be passed some search parameters, \nand should return any implied groups if they can be matched to the search \nparameters.\n\nFor example::\n\n from zope.interface import implements\n from zope.component import adapts\n \n from borg.supergroup.interfaces import ISuperGroupsEnumeration\n \n class ImpliedGroupsEnumeration(object):\n implements(ISuperGroupsEnumeration)\n \n def enumerate_groups(self, id=None, exact_match=False, **kw):\n if (exact_match and id == 'Alpha') or (not exact_match and id in 'Alpha'):\n yield dict(id='Alpha', title='Alpha Group')\n\nIn ZCML, this would be registered with::\n\n \n\nFor more examples, see the tests in integration.txt and the interface\ndeclarations in interfaces.py.\nChangelog\n=========\n\n1.0b1 - Unreleased\n----------------\n\n* Initial release", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://plone.org", "keywords": "Plone PAS", "license": "LGPL", "maintainer": null, "maintainer_email": null, "name": "borg.supergroup", "package_url": "https://pypi.org/project/borg.supergroup/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/borg.supergroup/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://plone.org" }, "release_url": "https://pypi.org/project/borg.supergroup/1.0rc1/", "requires_dist": null, "requires_python": null, "summary": "Create groups as if by super", "version": "1.0rc1" }, "last_serial": 786983, "releases": { "1.0rc1": [ { "comment_text": "", "digests": { "md5": "49268883b732e45d3cd4a2276869acca", "sha256": "a80cc6f809bf597ee2451bcbf73cb742af6c8be4f572877453d79cd78b64257d" }, "downloads": -1, "filename": "borg.supergroup-1.0rc1-py2.4.egg", "has_sig": false, "md5_digest": "49268883b732e45d3cd4a2276869acca", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 17088, "upload_time": "2008-04-05T17:44:24", "url": "https://files.pythonhosted.org/packages/b8/5c/755b3f018f14328119de88bda69edec05c625eeb5fd622e91f017986bf6d/borg.supergroup-1.0rc1-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "504abcc0d3870d694faa8ce1e9d45d86", "sha256": "75dd7d9d1500ce4b3fe470c2420c9622c8eb2516d57f517e428c4b73ed063ebe" }, "downloads": -1, "filename": "borg.supergroup-1.0rc1.tar.gz", "has_sig": false, "md5_digest": "504abcc0d3870d694faa8ce1e9d45d86", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13077, "upload_time": "2008-04-05T17:44:24", "url": "https://files.pythonhosted.org/packages/3a/6f/cf35732b7d44fb4cbb26bfedc432ffcfce6d03a6e26cdda971869d6b6729/borg.supergroup-1.0rc1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "49268883b732e45d3cd4a2276869acca", "sha256": "a80cc6f809bf597ee2451bcbf73cb742af6c8be4f572877453d79cd78b64257d" }, "downloads": -1, "filename": "borg.supergroup-1.0rc1-py2.4.egg", "has_sig": false, "md5_digest": "49268883b732e45d3cd4a2276869acca", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 17088, "upload_time": "2008-04-05T17:44:24", "url": "https://files.pythonhosted.org/packages/b8/5c/755b3f018f14328119de88bda69edec05c625eeb5fd622e91f017986bf6d/borg.supergroup-1.0rc1-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "504abcc0d3870d694faa8ce1e9d45d86", "sha256": "75dd7d9d1500ce4b3fe470c2420c9622c8eb2516d57f517e428c4b73ed063ebe" }, "downloads": -1, "filename": "borg.supergroup-1.0rc1.tar.gz", "has_sig": false, "md5_digest": "504abcc0d3870d694faa8ce1e9d45d86", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13077, "upload_time": "2008-04-05T17:44:24", "url": "https://files.pythonhosted.org/packages/3a/6f/cf35732b7d44fb4cbb26bfedc432ffcfce6d03a6e26cdda971869d6b6729/borg.supergroup-1.0rc1.tar.gz" } ] }