{
"info": {
"author": "Grok Team",
"author_email": "grok-dev@zope.org",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 6 - Mature",
"Intended Audience :: Developers",
"License :: OSI Approved :: Zope Public License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy"
],
"description": "This package provides basic elements for defining Zope permissions and\nsecurity checkers without ZCML.\n\n.. contents::\n\nSetting up ``grokcore.security``\n================================\n\nThis package is essentially set up like the `grokcore.component`_\npackage, please refer to its documentation for details. The\nadditional ZCML lines you will need are::\n\n \n \n\nPut this somewhere near the top of your root ZCML file but below the\nline where you include ``grokcore.component``'s configuration.\n\n\nDefining permissions\n====================\n\nIn `grokcore.component`_, various components are defined (and\nautomatically registered) by subclassing from certain baseclasses.\nThe same applies to defining permissions with ``grokcore.security`` as\nwell::\n\n import grokcore.security\n\n class EditContent(grokcore.security.Permission):\n grokcore.security.name('mypkg.EditContent')\n\nThis defines a permission with the ID ``mypkg.EditContent``. You must\nalways specify this ID explicitly. In addition, you can also give the\npermission a human-readable title and description. This is useful\nwhen your application provides lists of permissions somewhere and you\ndon't want to bother users with deciphering the dotted IDs::\n\n import grokcore.security\n\n class EditContent(grokcore.security.Permission):\n grokcore.security.name('mypkg.EditContent')\n grokcore.security.title('Edit content')\n grokcore.security.description('Anyone who has this permission may '\n 'modify content in the application.')\n\n\nDefining checkers for components\n================================\n\n``grokcore.security`` provides some means for defining checkers for\ncomponents:\n\n* ``grokcore.security.require(permission)`` which can be used either\n as a class-level directive to set a permission for a whole\n component, or as a decorator to set a permission for a function or\n method.\n\n* ``protect_getattr`` and ``protect_setattr``, available from\n ``grokcore.security.util``, which take a class, an attribute name\n and a permission as arguments and define Zope security checkers for\n getting or setting a particular attribute on instance of said class.\n\nWith these, you can build grokkers for components that need security\ndeclarations. For instance, the `grokcore.view`_ package uses them to\ndefine a grokker that makes security declarations for views::\n\n class ViewSecurityGrokker(martian.ClassGrokker):\n martian.component(grokcore.view.View)\n martian.directive(grokcore.security.require, name='permission')\n\n def execute(self, factory, config, permission, **kw):\n for method_name in zope.publisher.interfaces.browser.IBrowserPage:\n config.action(\n discriminator=('protectName', factory, method_name),\n callable=grokcore.security.util.protect_getattr,\n args=(factory, method_name, permission),\n )\n return True\n\nWith such a grokker, it is possible to protect views like so::\n\n class Edit(grokcore.view.View):\n grokcore.security.require(EditContent)\n\nNote how we can simply pass a permission class to the ``require``\ndirective. Alternatively, you can pass the permission ID::\n\n class Edit(grokcore.view.View):\n grokcore.security.require('mypkg.EditContent')\n\nIf you wanted to be able to define permissions for individual class\nmethods rather than the whole class, you would simply base your\ngrokker on ``martian.MethodGrokker`` rather than ``ClassGrokker``.\nThe actual mechanics of defining a checker are the same.\n\nPlease note that ``grokcore.security`` does not yet provide directives\nthat allow you to specify permissions for simple attribute access\n(read and write).\n\n\nAPI overview\n============\n\n``Permission``\n Base class for defining permissions. Use the ``name`` directive\n to define the mandatory permission ID. Optionally use the\n ``title`` and ``description`` directives to give the permission\n human-readable information.\n\n``Public``\n Special permission that can be referred to whenever a component\n should not be protected by a permission at all (public access).\n\n``require(permission_class_or_id)``\n declares that the use of a particular component (when used as a\n class-level directive) or a method (when used as a method\n decorator) requires a certain permission. The argument can either\n be a permission class (subclass of ``Permission``) or a permission\n ID.\n\nIn addition, the ``grokcore.security`` package exposes the\n`grokcore.component`_ API.\n\n\n.. _grokcore.component: http://pypi.python.org/pypi/grokcore.component\n.. _grokcore.view: http://pypi.python.org/pypi/grokcore.view\n\nChanges\n=======\n\n3.0.1 (2018-01-12)\n------------------\n\n- Rearrange tests such that Travis CI can pick up all functional tests too.\n\n3.0.0 (2018-01-05)\n------------------\n\n- Fix several test error that came to light.\n\n1.7 (2018-01-03)\n----------------\n\n- Python 3 compatibility.\n\n1.6.3 (2016-01-29)\n------------------\n\n- Update tests.\n\n1.6.2 (2012-05-07)\n------------------\n\n- Properly declare zope.dottedname as a dependency.\n\n1.6.1 (2012-05-02)\n------------------\n\n- Fix the package to properly work if the extra ``role`` is not\n specified.\n\n1.6 (2012-05-01)\n----------------\n\n- The Permission and Role components moved from the grok package to the\n grokcore.security package where it belongs.\n\n- The permissions() directive moved from the grok package to\n grokcore.security where it belongs.\n\n1.5 (2010-11-01)\n----------------\n\n- Upped the requirements for martian and grokcore.component.\n\n- Made package comply to zope.org repository policy.\n\n1.4 (2009-12-13)\n----------------\n\n* **note** Backed out the version requirements for\n grokcore.component-2.0 and martian-0.12. These requirements\n stood in the way of further development especially towards\n grok-1.1 based on the ZTK. The 1.3 version should probably\n have been called 2.0 like with grokcore.component.\n\n* Ported setup.py dependency fixes from trunk.\n\n* Use zope.security instead of zope.app.security.\n\n1.3 (2009-09-16)\n----------------\n\n* Use the grok.zope.org/releaseinfo information instead of our own\n copy of ``versions.cfg``, for easier maintenance.\n\n* Depend on grokcore.component 2.0 and the 0.12 Martian - this changes\n inheritance issues but doesn't appear to affect grokcore.security\n itself.\n\n1.2 (2009-09-14)\n----------------\n\n* Changed the default permissions from grok.View to zope.View. There seems no\n particular reason not to use the standard zope.View permission defined\n in zope.app.security.\n\n NOTE: YOU MUST STILL ASSIGN THIS PERMISSION TO USERS IN YOUR\n site.zcml FILE. OTHERWISE YOU DO NOT HAVE ACCESS TO ANY VIEWS.\n\n* Made sure to include zope.app.security configuration as well, as that\n package defines the zope.View permission. Note that in the future this will\n change to zope.security.\n\n* Bring versions.cfg in line with grok 1.0 release candidate\n versions.cfg.\n\n\n1.1 (2009-07-03)\n----------------\n\n* Changed the default permissions from zope.Public to grok.View.\n\n NOTE: YOU MUST ASSIGN THIS PERMISSION TO USERS IN YOUR\n site.zcml FILE. OTHERWISE YOU DO NOT HAVE ACCESS TO ANY VIEWS.\n\n1.0 (2008-08-03)\n----------------\n\n* Created ``grokcore.security`` in July 2008 by factoring\n security-related components, grokkers and directives out of Grok.",
"description_content_type": null,
"docs_url": null,
"download_url": "http://pypi.python.org/pypi/grokcore.security",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "http://grok.zope.org",
"keywords": "",
"license": "ZPL",
"maintainer": "",
"maintainer_email": "",
"name": "grokcore.security",
"package_url": "https://pypi.org/project/grokcore.security/",
"platform": "",
"project_url": "https://pypi.org/project/grokcore.security/",
"project_urls": {
"Download": "http://pypi.python.org/pypi/grokcore.security",
"Homepage": "http://grok.zope.org"
},
"release_url": "https://pypi.org/project/grokcore.security/3.0.1/",
"requires_dist": null,
"requires_python": "",
"summary": "Grok-like configuration for Zope security components",
"version": "3.0.1"
},
"last_serial": 3483969,
"releases": {
"1.0": [
{
"comment_text": "",
"digests": {
"md5": "e888b215691d0406392932d1ce6c578a",
"sha256": "647073fa308c9a50f83aeabe5e73956f777c3630e591282553c1798d87b6c736"
},
"downloads": -1,
"filename": "grokcore.security-1.0.tar.gz",
"has_sig": false,
"md5_digest": "e888b215691d0406392932d1ce6c578a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 11909,
"upload_time": "2008-08-03T17:15:41",
"url": "https://files.pythonhosted.org/packages/38/a5/a69f411e294e786790f7e9cc82587ce8e27a79ddb4eb078a057b6c9ecd07/grokcore.security-1.0.tar.gz"
}
],
"1.1": [
{
"comment_text": "",
"digests": {
"md5": "57169177a7f48333251f9de19aea2225",
"sha256": "ec1daeaca66147f2c2feb91358832b272f6b8a9d98c2fa37a25d0979b8c921f9"
},
"downloads": -1,
"filename": "grokcore.security-1.1.tar.gz",
"has_sig": false,
"md5_digest": "57169177a7f48333251f9de19aea2225",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 13261,
"upload_time": "2009-07-03T17:34:59",
"url": "https://files.pythonhosted.org/packages/8b/e1/2bd73030f34ba75152c75a7736af82f501b953068eee06be6844d3339ed4/grokcore.security-1.1.tar.gz"
}
],
"1.2": [
{
"comment_text": "",
"digests": {
"md5": "1e668b7e423814fa069c69f2a4014876",
"sha256": "48441f61fa81702d66c089035c9034ee538dd770db82e7bf5a9bff4bbe705bc7"
},
"downloads": -1,
"filename": "grokcore.security-1.2.tar.gz",
"has_sig": false,
"md5_digest": "1e668b7e423814fa069c69f2a4014876",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 13638,
"upload_time": "2009-09-14T16:48:40",
"url": "https://files.pythonhosted.org/packages/03/da/74730f61fb59f7148297ab5e1f1e79e1fadf498c40c4d6aefa1863070869/grokcore.security-1.2.tar.gz"
}
],
"1.3": [
{
"comment_text": "",
"digests": {
"md5": "4d0a0e818f9e74eff494735bd038c67b",
"sha256": "aabce5449aa167a0ec1bf4de1e8775b54dd53b4b06e9a3e5a33300dad434c744"
},
"downloads": -1,
"filename": "grokcore.security-1.3.tar.gz",
"has_sig": false,
"md5_digest": "4d0a0e818f9e74eff494735bd038c67b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12935,
"upload_time": "2009-09-16T11:45:08",
"url": "https://files.pythonhosted.org/packages/9a/4a/10936403b459dd8c5992a7b33cb3858c1a42d4bfa9567965af6a3bbc97e3/grokcore.security-1.3.tar.gz"
}
],
"1.4": [
{
"comment_text": "",
"digests": {
"md5": "8d11739f141c0d97574cdcc693ad9d3c",
"sha256": "0db82069ecd48b74d7e8926ebc27592bccce983c006762e594041320d4fae437"
},
"downloads": -1,
"filename": "grokcore.security-1.4.tar.gz",
"has_sig": false,
"md5_digest": "8d11739f141c0d97574cdcc693ad9d3c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 13743,
"upload_time": "2009-12-13T20:50:12",
"url": "https://files.pythonhosted.org/packages/a2/43/df52b0a8b792b0bcedcc2e37bd466cf8cea6df5b68ab85a75ebde1d3d6e2/grokcore.security-1.4.tar.gz"
}
],
"1.5": [
{
"comment_text": "",
"digests": {
"md5": "9cda73ca191e0098c6ac5a1cda3a9514",
"sha256": "3a63320131aa199e54bb627e7290f81d91d079bd36ecff33883f935dc5e33da3"
},
"downloads": -1,
"filename": "grokcore.security-1.5.tar.gz",
"has_sig": false,
"md5_digest": "9cda73ca191e0098c6ac5a1cda3a9514",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 15141,
"upload_time": "2010-11-01T20:39:35",
"url": "https://files.pythonhosted.org/packages/56/f0/8218e1e027ac64ae8dca7ddb7d1b5bc8aa087d2a9d9c5d2aae38195a551b/grokcore.security-1.5.tar.gz"
}
],
"1.6": [
{
"comment_text": "",
"digests": {
"md5": "5c2e598045bf6ef96ffaa89ebfb3d46c",
"sha256": "5dbdf287fe0808b89d023efec7dc19c57b7e3bb82109bd0450a9707967db26fe"
},
"downloads": -1,
"filename": "grokcore.security-1.6.tar.gz",
"has_sig": false,
"md5_digest": "5c2e598045bf6ef96ffaa89ebfb3d46c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19352,
"upload_time": "2012-05-01T19:26:20",
"url": "https://files.pythonhosted.org/packages/2e/9b/0da82ad1fba3a2615717bb491394f3443a0b4337557f8ffcd73631c6f46f/grokcore.security-1.6.tar.gz"
}
],
"1.6.1": [
{
"comment_text": "",
"digests": {
"md5": "508f2945a5952bbc27a1d51ca5e80a3f",
"sha256": "ae1e8ced00b406672b36658bff0d661dcecace76aac664f806b14ef9569b45fb"
},
"downloads": -1,
"filename": "grokcore.security-1.6.1.tar.gz",
"has_sig": false,
"md5_digest": "508f2945a5952bbc27a1d51ca5e80a3f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19593,
"upload_time": "2012-05-02T11:49:28",
"url": "https://files.pythonhosted.org/packages/34/92/504289fac576464169017dee8a93008fafb4083d49d6bb7af271d719c5ee/grokcore.security-1.6.1.tar.gz"
}
],
"1.6.2": [
{
"comment_text": "",
"digests": {
"md5": "6fb23b6784aa03fc90d1c35e61587ce8",
"sha256": "04848e3647977eae6377fef25dba547b5fd3b700a9b3acc942fd11f30556afac"
},
"downloads": -1,
"filename": "grokcore.security-1.6.2.tar.gz",
"has_sig": false,
"md5_digest": "6fb23b6784aa03fc90d1c35e61587ce8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19874,
"upload_time": "2012-05-07T10:48:41",
"url": "https://files.pythonhosted.org/packages/ae/10/260254d718189540b65d06f12076399a11188ce1e6adf6f3c4d2fb733d56/grokcore.security-1.6.2.tar.gz"
}
],
"1.6.3": [
{
"comment_text": "",
"digests": {
"md5": "7a4d0c05ee6841edbc49b7dea53d767b",
"sha256": "3a7400be830e172c3e0347af437ed7cf0fb5aee31afbfb51216ab5a59eeb7401"
},
"downloads": -1,
"filename": "grokcore.security-1.6.3.tar.gz",
"has_sig": false,
"md5_digest": "7a4d0c05ee6841edbc49b7dea53d767b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19021,
"upload_time": "2016-01-29T14:59:02",
"url": "https://files.pythonhosted.org/packages/00/13/cc7aae481ec769b04b3344536435d86bce297c601547390c91f478cdf41e/grokcore.security-1.6.3.tar.gz"
}
],
"1.7": [
{
"comment_text": "",
"digests": {
"md5": "c9ebaa091b4213a6632a9250d2e367b5",
"sha256": "23e61432274120c481c61c7f999319ea9ed59487a4453db2b330638f40a75c2a"
},
"downloads": -1,
"filename": "grokcore.security-1.7.tar.gz",
"has_sig": false,
"md5_digest": "c9ebaa091b4213a6632a9250d2e367b5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19491,
"upload_time": "2018-01-03T14:00:53",
"url": "https://files.pythonhosted.org/packages/53/90/d0feee1135bd39b8d9e168153b87a040fe986e332ac27218a10ac3fccfc1/grokcore.security-1.7.tar.gz"
}
],
"3.0.0": [
{
"comment_text": "",
"digests": {
"md5": "dd392340e03580255f1522d1c089a1dc",
"sha256": "caa81f2bb588824ce49c39b2b42c4a45aad23a9b5177234006d7a085c57acf42"
},
"downloads": -1,
"filename": "grokcore.security-3.0.0.tar.gz",
"has_sig": false,
"md5_digest": "dd392340e03580255f1522d1c089a1dc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19623,
"upload_time": "2018-01-05T12:26:53",
"url": "https://files.pythonhosted.org/packages/3a/cc/65cad28c769612095bd70b200dba5490bba3b0c34b8cf6af0aca1aa140e9/grokcore.security-3.0.0.tar.gz"
}
],
"3.0.1": [
{
"comment_text": "",
"digests": {
"md5": "62b2518a7249fdc20ccb7d50942af5d9",
"sha256": "658cf9a988b322b87dbc3e042e651a292668fd55f09270fd4e1ca6f09b1d5c35"
},
"downloads": -1,
"filename": "grokcore.security-3.0.1.tar.gz",
"has_sig": false,
"md5_digest": "62b2518a7249fdc20ccb7d50942af5d9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19929,
"upload_time": "2018-01-12T13:16:36",
"url": "https://files.pythonhosted.org/packages/37/ef/0b88403943baf83e077bc201ca84e5be08a245523f51a41e7bd0cab9b588/grokcore.security-3.0.1.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "62b2518a7249fdc20ccb7d50942af5d9",
"sha256": "658cf9a988b322b87dbc3e042e651a292668fd55f09270fd4e1ca6f09b1d5c35"
},
"downloads": -1,
"filename": "grokcore.security-3.0.1.tar.gz",
"has_sig": false,
"md5_digest": "62b2518a7249fdc20ccb7d50942af5d9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19929,
"upload_time": "2018-01-12T13:16:36",
"url": "https://files.pythonhosted.org/packages/37/ef/0b88403943baf83e077bc201ca84e5be08a245523f51a41e7bd0cab9b588/grokcore.security-3.0.1.tar.gz"
}
]
}