{ "info": { "author": "Zope Foundation and Contributors", "author_email": "zope-dev@zope.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Zope :: 3", "Intended Audience :: Developers", "License :: OSI Approved :: Zope Public License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Internet :: WWW/HTTP" ], "description": "This package provides ZMI browser views for Zope security components.\n\nIt used to provide a large part of security functionality for Zope 3, but it was\nfactored out from this package to several little packages to reduce dependencies\nand improve reusability.\n\nThe functionality was splitted into these new packages:\n\n * zope.authentication - the IAuthentication interface and related utilities.\n * zope.principalregistry - the global principal registry and its zcml directives.\n * zope.app.localpermission - the LocalPermission class that implements\n persistent permissions.\n\nThe rest of functionality that were provided by this package is merged into\n``zope.security`` and ``zope.publisher``.\n\nBackward-compatibility imports are provided to ensure that older applications\nwork. See CHANGES.txt for more info.\n\n\nDetailed Documentation\n======================\n\n\n===========================================\nThe Query View for Authentication Utilities\n===========================================\n\nA regular authentication service will not provide the `ISourceQueriables`\ninterface, but it is a queriable itself, since it provides the simple\n`getPrincipals(name)` method:\n\n >>> class Principal:\n ... def __init__(self, id):\n ... self.id = id\n\n >>> class MyAuthUtility:\n ... data = {'jim': Principal(42), 'don': Principal(0),\n ... 'stephan': Principal(1)}\n ...\n ... def getPrincipals(self, name):\n ... return [principal\n ... for id, principal in self.data.items()\n ... if name in id]\n\nNow that we have our queriable, we create the view for it:\n\n >>> from zope.app.security.browser.auth import AuthUtilitySearchView\n >>> from zope.publisher.browser import TestRequest\n >>> request = TestRequest()\n >>> view = AuthUtilitySearchView(MyAuthUtility(), request)\n\nThis allows us to render a search form.\n\n >>> print(view.render('test')) # doctest: +NORMALIZE_WHITESPACE\n