zope.app.localpermission-3.7.2/ 000755 000766 000024 00000000000 11351443753 016373 5 ustar 00mac staff 000000 000000 zope.app.localpermission-3.7.2/CHANGES.txt 000644 000766 000024 00000000567 11351443750 020211 0 ustar 00mac staff 000000 000000 =======
CHANGES
=======
3.7.2 (2010-03-21)
------------------
- Added missing i18n domain to ``browser.zcml``.
3.7.1 (2010-02-22)
------------------
- The zope.app namespace wasn't declared correctly.
3.7.0 (2009-03-14)
------------------
Initial release. This package was extracted from zope.app.security to separate
the functionality without additional dependencies.
zope.app.localpermission-3.7.2/PKG-INFO 000644 000766 000024 00000003210 11351443753 017464 0 ustar 00mac staff 000000 000000 Metadata-Version: 1.0
Name: zope.app.localpermission
Version: 3.7.2
Summary: Local Persistent Permissions for zope.security
Home-page: http://pypi.python.org/pypi/zope.app.localpermission
Author: Zope Corporation and Contributors
Author-email: zope-dev@zope.org
License: ZPL 2.1
Description: This package implements local persistent permissions for zope.security that
can be added and registered per site.
This is a part of "Through The Web" development pattern that is not used
much by zope community and not really supported in zope framework anymore
nowadays, so it can be considered as deprecated.
=======
CHANGES
=======
3.7.2 (2010-03-21)
------------------
- Added missing i18n domain to ``browser.zcml``.
3.7.1 (2010-02-22)
------------------
- The zope.app namespace wasn't declared correctly.
3.7.0 (2009-03-14)
------------------
Initial release. This package was extracted from zope.app.security to separate
the functionality without additional dependencies.
Keywords: zope security persistent local permission
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Zope Public License
Classifier: Programming Language :: Python
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Framework :: Zope3
zope.app.localpermission-3.7.2/README.txt 000644 000766 000024 00000000467 11351443750 020075 0 ustar 00mac staff 000000 000000 This package implements local persistent permissions for zope.security that
can be added and registered per site.
This is a part of "Through The Web" development pattern that is not used
much by zope community and not really supported in zope framework anymore
nowadays, so it can be considered as deprecated.
zope.app.localpermission-3.7.2/bootstrap.py 000644 000766 000024 00000003370 11351443750 020762 0 ustar 00mac staff 000000 000000 ##############################################################################
#
# Copyright (c) 2006 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Bootstrap a buildout-based project
Simply run this script in a directory containing a buildout.cfg.
The script accepts buildout command-line options, so you can
use the -c option to specify an alternate configuration file.
$Id: bootstrap.py 73551 2007-03-25 09:14:36Z dobe $
"""
import os, shutil, sys, tempfile, urllib2
tmpeggs = tempfile.mkdtemp()
ez = {}
exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
).read() in ez
ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
import pkg_resources
cmd = 'from setuptools.command.easy_install import main; main()'
if sys.platform == 'win32':
cmd = '"%s"' % cmd # work around spawn lamosity on windows
ws = pkg_resources.working_set
assert os.spawnle(
os.P_WAIT, sys.executable, sys.executable,
'-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout',
dict(os.environ,
PYTHONPATH=
ws.find(pkg_resources.Requirement.parse('setuptools')).location
),
) == 0
ws.add_entry(tmpeggs)
ws.require('zc.buildout')
import zc.buildout.buildout
zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
shutil.rmtree(tmpeggs)
zope.app.localpermission-3.7.2/buildout.cfg 000644 000766 000024 00000000620 11351443750 020676 0 ustar 00mac staff 000000 000000 [buildout]
develop = .
parts = test coverage-test coverage-report
[test]
recipe = zc.recipe.testrunner
eggs = zope.app.localpermission
[coverage-test]
recipe = zc.recipe.testrunner
eggs = zope.app.localpermission
defaults = ['--coverage', '../../coverage']
[coverage-report]
recipe = zc.recipe.egg
eggs = z3c.coverage
scripts = coverage=coverage-report
arguments = ('coverage', 'coverage/report')
zope.app.localpermission-3.7.2/setup.cfg 000644 000766 000024 00000000073 11351443753 020214 0 ustar 00mac staff 000000 000000 [egg_info]
tag_build =
tag_date = 0
tag_svn_revision = 0
zope.app.localpermission-3.7.2/setup.py 000644 000766 000024 00000004407 11351443750 020107 0 ustar 00mac staff 000000 000000 ##############################################################################
#
# Copyright (c) 2009 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Setup for zope.app.localpermission package
$Id: setup.py 110099 2010-03-21 16:22:36Z icemac $
"""
import os
from setuptools import setup, find_packages
def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
setup(name='zope.app.localpermission',
version = '3.7.2',
author='Zope Corporation and Contributors',
author_email='zope-dev@zope.org',
description='Local Persistent Permissions for zope.security',
long_description=(
read('README.txt')
+ '\n\n' +
read('CHANGES.txt')
),
keywords = "zope security persistent local permission",
classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: Zope Public License',
'Programming Language :: Python',
'Natural Language :: English',
'Operating System :: OS Independent',
'Topic :: Internet :: WWW/HTTP',
'Framework :: Zope3'],
url='http://pypi.python.org/pypi/zope.app.localpermission',
license='ZPL 2.1',
packages=find_packages('src'),
package_dir = {'': 'src'},
namespace_packages=['zope', 'zope.app'],
install_requires=['setuptools',
'ZODB3',
'zope.component',
'zope.i18nmessageid',
'zope.interface',
'zope.location',
'zope.security',
],
include_package_data = True,
zip_safe = False,
)
zope.app.localpermission-3.7.2/src/ 000755 000766 000024 00000000000 11351443753 017162 5 ustar 00mac staff 000000 000000 zope.app.localpermission-3.7.2/src/zope/ 000755 000766 000024 00000000000 11351443753 020137 5 ustar 00mac staff 000000 000000 zope.app.localpermission-3.7.2/src/zope.app.localpermission.egg-info/ 000755 000766 000024 00000000000 11351443753 025612 5 ustar 00mac staff 000000 000000 zope.app.localpermission-3.7.2/src/zope.app.localpermission.egg-info/PKG-INFO 000644 000766 000024 00000003210 11351443752 026702 0 ustar 00mac staff 000000 000000 Metadata-Version: 1.0
Name: zope.app.localpermission
Version: 3.7.2
Summary: Local Persistent Permissions for zope.security
Home-page: http://pypi.python.org/pypi/zope.app.localpermission
Author: Zope Corporation and Contributors
Author-email: zope-dev@zope.org
License: ZPL 2.1
Description: This package implements local persistent permissions for zope.security that
can be added and registered per site.
This is a part of "Through The Web" development pattern that is not used
much by zope community and not really supported in zope framework anymore
nowadays, so it can be considered as deprecated.
=======
CHANGES
=======
3.7.2 (2010-03-21)
------------------
- Added missing i18n domain to ``browser.zcml``.
3.7.1 (2010-02-22)
------------------
- The zope.app namespace wasn't declared correctly.
3.7.0 (2009-03-14)
------------------
Initial release. This package was extracted from zope.app.security to separate
the functionality without additional dependencies.
Keywords: zope security persistent local permission
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Zope Public License
Classifier: Programming Language :: Python
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Framework :: Zope3
zope.app.localpermission-3.7.2/src/zope.app.localpermission.egg-info/SOURCES.txt 000644 000766 000024 00000001252 11351443752 027475 0 ustar 00mac staff 000000 000000 CHANGES.txt
README.txt
bootstrap.py
buildout.cfg
setup.py
src/zope/__init__.py
src/zope.app.localpermission.egg-info/PKG-INFO
src/zope.app.localpermission.egg-info/SOURCES.txt
src/zope.app.localpermission.egg-info/dependency_links.txt
src/zope.app.localpermission.egg-info/namespace_packages.txt
src/zope.app.localpermission.egg-info/not-zip-safe
src/zope.app.localpermission.egg-info/requires.txt
src/zope.app.localpermission.egg-info/top_level.txt
src/zope/app/__init__.py
src/zope/app/localpermission/__init__.py
src/zope/app/localpermission/browser.zcml
src/zope/app/localpermission/configure.zcml
src/zope/app/localpermission/permission.py
src/zope/app/localpermission/tests.py zope.app.localpermission-3.7.2/src/zope.app.localpermission.egg-info/dependency_links.txt 000644 000766 000024 00000000001 11351443752 031657 0 ustar 00mac staff 000000 000000
zope.app.localpermission-3.7.2/src/zope.app.localpermission.egg-info/namespace_packages.txt 000644 000766 000024 00000000016 11351443752 032141 0 ustar 00mac staff 000000 000000 zope
zope.app
zope.app.localpermission-3.7.2/src/zope.app.localpermission.egg-info/not-zip-safe 000644 000766 000024 00000000001 11351443751 030036 0 ustar 00mac staff 000000 000000
zope.app.localpermission-3.7.2/src/zope.app.localpermission.egg-info/requires.txt 000644 000766 000024 00000000135 11351443752 030210 0 ustar 00mac staff 000000 000000 setuptools
ZODB3
zope.component
zope.i18nmessageid
zope.interface
zope.location
zope.security zope.app.localpermission-3.7.2/src/zope.app.localpermission.egg-info/top_level.txt 000644 000766 000024 00000000005 11351443752 030336 0 ustar 00mac staff 000000 000000 zope
zope.app.localpermission-3.7.2/src/zope/__init__.py 000644 000766 000024 00000000070 11351443750 022242 0 ustar 00mac staff 000000 000000 __import__('pkg_resources').declare_namespace(__name__)
zope.app.localpermission-3.7.2/src/zope/app/ 000755 000766 000024 00000000000 11351443753 020717 5 ustar 00mac staff 000000 000000 zope.app.localpermission-3.7.2/src/zope/app/__init__.py 000644 000766 000024 00000000070 11351443750 023022 0 ustar 00mac staff 000000 000000 __import__('pkg_resources').declare_namespace(__name__)
zope.app.localpermission-3.7.2/src/zope/app/localpermission/ 000755 000766 000024 00000000000 11351443753 024122 5 ustar 00mac staff 000000 000000 zope.app.localpermission-3.7.2/src/zope/app/localpermission/__init__.py 000644 000766 000024 00000000100 11351443750 026217 0 ustar 00mac staff 000000 000000 from zope.app.localpermission.permission import LocalPermission
zope.app.localpermission-3.7.2/src/zope/app/localpermission/browser.zcml 000644 000766 000024 00000001454 11351443750 026475 0 ustar 00mac staff 000000 000000
zope.app.localpermission-3.7.2/src/zope/app/localpermission/configure.zcml 000644 000766 000024 00000001674 11351443750 026777 0 ustar 00mac staff 000000 000000
zope.app.localpermission-3.7.2/src/zope/app/localpermission/permission.py 000644 000766 000024 00000006131 11351443750 026662 0 ustar 00mac staff 000000 000000 ##############################################################################
#
# Copyright (c) 2009 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Persistent Local Permissions
$Id: permission.py 97714 2009-03-09 18:52:31Z nadako $
"""
__docformat__ = 'restructuredtext'
from persistent import Persistent
from zope.component import adapter
from zope.component.interfaces import IRegistered, IUnregistered
from zope.i18nmessageid import MessageFactory
from zope.interface import implements
from zope.location import Location
from zope.security.interfaces import IPermission
_ = MessageFactory('zope')
NULL_ID = _(u'')
class LocalPermission(Persistent, Location):
implements(IPermission)
def __init__(self, title=u'', description=u''):
self.id = NULL_ID
self.title = title
self.description = description
@adapter(IPermission, IRegistered)
def setIdOnActivation(permission, event):
"""Set the permission id upon registration activation.
Let's see how this notifier can be used. First we need to create an event
using the permission instance and a registration stub:
>>> class Registration:
... def __init__(self, obj, name):
... self.component = obj
... self.name = name
>>> perm1 = LocalPermission('Permission 1', 'A first permission')
>>> perm1.id
u''
>>> import zope.component.interfaces
>>> event = zope.component.interfaces.Registered(
... Registration(perm1, 'perm1'))
Now we pass the event into this function, and the id of the permission
should be set to 'perm1'.
>>> setIdOnActivation(perm1, event)
>>> perm1.id
'perm1'
"""
permission.id = event.object.name
@adapter(IPermission, IUnregistered)
def unsetIdOnDeactivation(permission, event):
"""Unset the permission id up registration deactivation.
Let's see how this notifier can be used. First we need to create an event
using the permission instance and a registration stub:
>>> class Registration:
... def __init__(self, obj, name):
... self.component = obj
... self.name = name
>>> perm1 = LocalPermission('Permission 1', 'A first permission')
>>> perm1.id = 'perm1'
>>> import zope.component.interfaces
>>> event = zope.component.interfaces.Unregistered(
... Registration(perm1, 'perm1'))
Now we pass the event into this function, and the id of the permission
should be set to NULL_ID.
>>> unsetIdOnDeactivation(perm1, event)
>>> perm1.id
u''
"""
permission.id = NULL_ID
zope.app.localpermission-3.7.2/src/zope/app/localpermission/tests.py 000644 000766 000024 00000001514 11351443750 025634 0 ustar 00mac staff 000000 000000 ##############################################################################
#
# Copyright (c) 2004 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Tests for zope.localpermission.
$Id$
"""
import unittest
import doctest
def test_suite():
return unittest.TestSuite((
doctest.DocTestSuite('zope.app.localpermission.permission'),
))