{ "info": { "author": "Simon Kaeser", "author_email": "skaeser@gmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Introduction\n============\n\nThe ``horae.auth`` package provides a pluggable users and groups architecture for the Horae\nresource planning system and includes the following functionality:\n\n* Provides an authenticator and session credentials plugin using\n `zope.pluggableauth `_\n* Defines default roles and permissions for Horae\n* Defines generic interfaces for users and groups and hooks for additional packages to provide them\n* Provides basic login and logout views based on `horae.layout `_\n* Sharing\n\nAuthenticator and session credentials plugin\n============================================\n\nBoth plugins are defined in ``horae.auth.auth`` and setup by the ``horae.auth.auth.setup_authentication``\nfunction. To use the plugins they have to be registered with the grok application which the following\nexample illustrates::\n\n import grok\n from zope.app.authentication.authentication import (\n PluggableAuthentication)\n from zope.app.security.interfaces import IAuthentication\n \n from horae.auth import auth\n \n class SampleApplication(grok.Application):\n grok.local_utility(PluggableAuthentication,\n provides=IAuthentication,\n setup=auth.setup_authentication)\n\nRoles and permissions\n=====================\n\nThe following default permissions are defined by ``horae.auth``:\n\n**View**\n Permission required to view an object\n**Edit**\n Permission required to edit an object\n**Delete**\n Permission required to delete an object\n**ViewHistory**\n Permission required to view the history of an object\n**AddClient**\n Permission required to add a client\n**AddProject**\n Permission required to add a project\n**AddMilestone**\n Permission required to add a milestone\n**AddTicket**\n Permission required to add a ticket\n**ChangeTicket**\n Permission required to change a ticket\n**ViewHiddenProperties**\n Permission required to view hidden properties\n**Manage**\n Management permission\n**ManageGroups**\n Permission required to manage groups\n**ManageUsers**\n Permission required to manage users\n**Sharing**\n Permission required to share objects\n\nBased on those permissions the following roles are defined:\n\n**Manager**\n View, Edit, Delete, ViewHistory, AddClient, AddProject, AddMilestone, AddTicket, ChangeTicket, ViewHiddenProperties, Manage, ManageGroups, ManageUsers, Sharing\n**Administrator**\n View, Edit, Delete, ViewHistory, AddClient, AddProject, AddMilestone, AddTicket, ChangeTicket, ViewHiddenProperties, ManageUsers, Sharing\n**Owner**\n View, Edit, Manage\n**Member**\n Assigned to every user\n**Reader**\n View, ViewHistory\n**Editor**\n View, Edit, ViewHistory, ChangeTicket\n**Contributor**\n View, Edit, Delete, AddClient, AddProject, AddMilestone, AddTicket, ViewHistory, ChangeTicket\n**TicketEditor**\n View, AddTicket, ViewHistory, ChangeTicket\n**Responsible**\n View, Edit, ViewHistory, ChangeTicket\n\nGeneric interfaces and hooks\n============================\n\nThe main interfaces defined by ``horae.auth`` are:\n\n* ``horae.auth.interfaces.IUser``\n* ``horae.auth.interfaces.IGroup``\n* ``horae.auth.interfaces.IUserProvider``\n* ``horae.auth.interfaces.IGroupProvider``\n\n``horae.auth`` does not provide any implementation of those interfaces which is done by\npackages like `horae.usersandgroups `_.\nThis architecture makes it possible to quite easily plug in new user and group sources\nsuch as LDAP [#]_.\n\nAs mentioned above a sample implementation may be found in the package `horae.usersandgroups\n`_ which provides persistent users\nand groups and basic CRUD [#]_ functionality.\n\nSharing\n=======\n\nMarking objects as shareable (implementing ``horae.auth.interfaces.IShareable``)\nmakes it possible to grant roles for users and groups on the specific object. The roles\nare inherited from parent objects by default making it possible to grant a role for an\nobject and all its childs. Role inheritance may be disabled individually for shareable\nobjects. The roles available to be granted are defined by named utilities implementing\n``horae.auth.interfaces.ISelectableRoleProvider``. The default implementation is located\nat ``horae.auth.auth`` and looks like this::\n\n from horae.auth import interfaces\n \n class SelectableRoleProvider(grok.GlobalUtility):\n \"\"\" Provider for selectable roles\n \"\"\"\n grok.implements(interfaces.ISelectableRoleProvider)\n grok.provides(interfaces.ISelectableRoleProvider)\n grok.name('horae.auth.selectableroles')\n \n def roles(self):\n \"\"\" Returns a list of role names\n \"\"\"\n return ['horae.Reader', 'horae.Editor', 'horae.Contributor', 'horae.TicketEditor']\n\nand thus makes the roles ``Reader``, ``Editor``, ``Contributor`` and ``TicketEditor`` available\nto be granted for shareable objects. To make other roles available additional providers may be\nregistered::\n\n class SampleSelectableRoleProvider(grok.GlobalUtility):\n \"\"\" Provider for selectable roles\n \"\"\"\n grok.implements(interfaces.ISelectableRoleProvider)\n grok.provides(interfaces.ISelectableRoleProvider)\n grok.name('horae.sampleadditionalroles.selectableroles')\n \n def roles(self):\n \"\"\" Returns a list of role names\n \"\"\"\n return ['horae.SampleRole1', 'horae.SampleRole2']\n\nEnabling the sharing functionality on an object is simply done by letting it implement the marker\ninterface ``horae.auth.interfaces.IShareable``. This may be done by having the class directly\nimplement the interface::\n\n class MyShareableContent(grok.Model):\n grok.implements(interfaces.IShareable)\n\nor by doing so from outside the class definition which is especially usable if the desired class\nis part of a module not related to ``horae.auth``::\n\n from zope.interface import classImplements\n \n from some.other.unrelated.module import OtherContent\n \n classImplements(OtherContent, interfaces.IShareable)\n\nDependencies\n============\n\nHorae\n-----\n\n* `horae.cache `_\n* `horae.core `_\n* `horae.layout `_\n\nThird party\n-----------\n\n* `grok `_\n* `zope.pluggableauth `_\n\n.. [#] `Lightweight Directory Access Protocol `_\n.. [#] **C**\\ reate **R**\\ ead **U**\\ pdate **D**\\ elete.\n\nChangelog\n=========\n\n1.0a1 (2012-01-16)\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": "UNKNOWN", "keywords": "", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "horae.auth", "package_url": "https://pypi.org/project/horae.auth/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/horae.auth/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/horae.auth/1.0a1/", "requires_dist": null, "requires_python": null, "summary": "Provides a pluggable users and groups architecture for the Horae resource planning system", "version": "1.0a1" }, "last_serial": 792984, "releases": { "1.0a1": [ { "comment_text": "", "digests": { "md5": "2b6fe9b9d445a7eb6c6600a61676c3c8", "sha256": "a157e991e6c1d20fecde0a1d56d81c07f694f50ee7d17eb44092ea9c4f93ff78" }, "downloads": -1, "filename": "horae.auth-1.0a1.tar.gz", "has_sig": false, "md5_digest": "2b6fe9b9d445a7eb6c6600a61676c3c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14886, "upload_time": "2012-01-16T12:02:42", "url": "https://files.pythonhosted.org/packages/2b/82/962667f1ba957ed0f9497b52d5dd4a58a2dc856164acf3d61cc5de6c8249/horae.auth-1.0a1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2b6fe9b9d445a7eb6c6600a61676c3c8", "sha256": "a157e991e6c1d20fecde0a1d56d81c07f694f50ee7d17eb44092ea9c4f93ff78" }, "downloads": -1, "filename": "horae.auth-1.0a1.tar.gz", "has_sig": false, "md5_digest": "2b6fe9b9d445a7eb6c6600a61676c3c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14886, "upload_time": "2012-01-16T12:02:42", "url": "https://files.pythonhosted.org/packages/2b/82/962667f1ba957ed0f9497b52d5dd4a58a2dc856164acf3d61cc5de6c8249/horae.auth-1.0a1.tar.gz" } ] }