Zope Subversion Repository

  Zope

Zope: zope.security/trunk/src/zope/security/tests/test_checker.py


No default branch

Revision 125980 - (view) (download) (as text) - [select for diffs]
Modified Thu May 17 21:22:20 2012 UTC (12 months ago) by tseaver
File length: 24108 byte(s)
Diff to previous 113056
Drop support for Python 2.4 and 2.5.

Replace deprecated 'zope.component.adapts' usage with equivalent
'zope.component.adapter' decorator.

Replace deprecated 'zope.interface.classProvides' usage with equivalent
'zope.interface.provider' decorator.

Replace deprecated 'zope.interface.implements' usage with equivalent
'zope.interface.implementer' decorator.


Revision 113056 - (view) (download) (as text) - [select for diffs]
Modified Thu Jun 3 17:34:32 2010 UTC (2 years, 11 months ago) by tseaver
File length: 24111 byte(s)
Diff to previous 112046
Remove CVS-era Id fossils.

Revision 112046 - (view) (download) (as text) - [select for diffs]
Modified Wed May 5 19:21:19 2010 UTC (3 years ago) by tseaver
File length: 24117 byte(s)
Diff to previous 97949
Conform to repository policy.

Revision 97949 - (view) (download) (as text) - [select for diffs]
Modified Thu Mar 12 03:09:05 2009 UTC (4 years, 2 months ago) by nadako
File length: 24118 byte(s)
Diff to previous 75174
Add zope.i18nmessage.Message to non-proxied basic types, as it's immutable and it was done by zope.app.security.

Add __name__ and __parent__ to list of available by default attributes. It was also done by zope.app.security before.

Revision 75174 - (view) (download) (as text) - [select for diffs]
Modified Thu May 3 22:29:32 2007 UTC (6 years ago) by ctheune
File length: 23994 byte(s)
Diff to previous 67630
Moving code to satellite.

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 67630 - (view) (download) (as text) - [select for diffs]
Modified Thu Apr 27 00:54:03 2006 UTC (7 years ago) by jim
File length: 23994 byte(s)
Diff to previous 40886
Merge of jim-adapter branch:

This branch has three major refactorings on it:

- A redesign of the adapter registration machinery

- A major simplification of local component management

  See zope.component.interfaces.IComponentRegistry.

- A flexible system for combining component registries.

- A beginning of the migration of packages out of zope.app.

- A new package for doing deferred imports.  This allows you
  to make names available at the package level without creating
  circular imports.  See zope.deferredimport and see
  zope.component.__init__ for examples of it's use.  This package
  also provides a way to deprecate names in a module.

- Deprecation of zope. i18nmessageid.MessageID

I should have created checkin messages for individual sets of related
changes, but there were just too many for the time allowed.


Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 40886 - (view) (download) (as text) - [select for diffs]
Modified Mon Dec 19 17:47:35 2005 UTC (7 years, 5 months ago) by poster
File length: 24092 byte(s)
Diff to previous 39777
Make changes as discussed in http://www.zope.org/Collectors/Zope3-dev/506: canWrite now does not raise Forbidden if canAccess does not, effectively.

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 39777 - (view) (download) (as text) - [select for diffs]
Modified Mon Oct 31 19:08:20 2005 UTC (7 years, 6 months ago) by jim
File length: 23142 byte(s)
Diff to previous 39662
Integrated newer version of zdaemon that has more robust tests.

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 39662 - (view) (download) (as text) - [select for diffs]
Modified Thu Oct 27 02:26:46 2005 UTC (7 years, 6 months ago) by srichter
File length: 22645 byte(s)
Diff to previous 29482
I think this fixes our security proxy issues. Gary, that's cool with you?


Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 29482 - (view) (download) (as text) - [select for diffs]
Modified Tue Mar 15 20:17:08 2005 UTC (8 years, 2 months ago) by garrett
File length: 20809 byte(s)
Diff to previous 28952
No longer re-proxying objects that provide an explicit __Security_checker__.

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 28952 - (view) (download) (as text) - [select for diffs]
Modified Tue Jan 25 03:23:41 2005 UTC (8 years, 3 months ago) by poster
File length: 20223 byte(s)
Diff to previous 27237
Add two convenience functions: canWrite and canAccess.  While the tests for this package are not doc tests, I included doctest-like comments in the tests.  Since these functions are primarily conveniences for app code, I imported them in the package __init__.

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 27237 - (view) (download) (as text) - [select for diffs]
Modified Mon Aug 23 23:42:11 2004 UTC (8 years, 8 months ago) by jim
File length: 17082 byte(s)
Diff to previous 26787
Merged from ZopeX3-3.0 branch:

  r27201 | jim | 2004-08-20 18:14:11 -0400 (Fri, 20 Aug 2004) | 2 lines

  Removed unneeded removeAllProxies calls.

  ------------------------------------------------------------------------
  r27200 | jim | 2004-08-20 17:47:26 -0400 (Fri, 20 Aug 2004) | 2 lines

  Removed unneeded removeAllProxies calls.

  ------------------------------------------------------------------------
  r27199 | jim | 2004-08-20 17:42:45 -0400 (Fri, 20 Aug 2004) | 2 lines

  Converted removeAllProxies calls to the prefered removeSecurityProxy.

  ------------------------------------------------------------------------
  r27198 | jim | 2004-08-20 17:07:23 -0400 (Fri, 20 Aug 2004) | 2 lines

  Converted a package with one module to a regulat module.

  ------------------------------------------------------------------------
  r27197 | jim | 2004-08-20 17:05:39 -0400 (Fri, 20 Aug 2004) | 2 lines

  Made the dependency subscriber trusted

  ------------------------------------------------------------------------
  r27196 | jim | 2004-08-20 17:05:37 -0400 (Fri, 20 Aug 2004) | 8 lines

  Converted removeAllProxies calls to the prefered removeSecurityProxy.

  D      src/zope/app/security/interfaces
  D      src/zope/app/security/interfaces/__init__.py
  A  +   src/zope/app/security/interfaces.py

  Converted a package with one module to a regulat module.

  ------------------------------------------------------------------------
  r27195 | jim | 2004-08-20 16:29:43 -0400 (Fri, 20 Aug 2004) | 4 lines


  Added a zapi.isinstance method that works with security proxies.


  ------------------------------------------------------------------------
  r27194 | jim | 2004-08-20 15:26:59 -0400 (Fri, 20 Aug 2004) | 3 lines

  Added some defensive programming to work around a lame implicit Python
  string-formatting behavior.

  ------------------------------------------------------------------------
  r27193 | jim | 2004-08-20 15:26:57 -0400 (Fri, 20 Aug 2004) | 2 lines

  Removed unneeded removeAllProxies call

  ------------------------------------------------------------------------
  r27192 | jim | 2004-08-20 15:26:55 -0400 (Fri, 20 Aug 2004) | 3 lines

  Fixed a problem with the security dclarations to make calling
  removeAllProxies unnecessary.

  ------------------------------------------------------------------------
  r27191 | jim | 2004-08-20 14:20:12 -0400 (Fri, 20 Aug 2004) | 2 lines

  Removed unneeded removeAllProxies calls.

  ------------------------------------------------------------------------
  r27190 | jim | 2004-08-20 14:20:07 -0400 (Fri, 20 Aug 2004) | 2 lines

  Converted removeAllProxies calls to the prefered removeSecurityProxy.

  ------------------------------------------------------------------------
  r27189 | jim | 2004-08-20 13:02:06 -0400 (Fri, 20 Aug 2004) | 6 lines

  Added "trusted" option for defining trusted subscribers.

  Deprecated zope.security.trustedRemoveSecurityProxy and
  zope.security.getProxiedObject. Use zope.security.removeSecurityProxy
  instead.  (This should also be used rather than removeAllProxies.)

  ------------------------------------------------------------------------
  r27188 | jim | 2004-08-20 13:02:03 -0400 (Fri, 20 Aug 2004) | 4 lines

  Deprecated zope.security.trustedRemoveSecurityProxy and
  zope.security.getProxiedObject. Use zope.security.removeSecurityProxy
  instead.  (This should also be used rather than removeAllProxies.)


Also converted additional removeAllProxies calls to the prefered
removeSecurityProxy. (These were on the trunk, but not the branch.)



Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 26787 - (view) (download) (as text) - [select for diffs]
Modified Tue Jul 27 14:00:42 2004 UTC (8 years, 9 months ago) by jim
File length: 17064 byte(s)
Diff to previous 26752
Moved forbidden and unauthorized exception definitions to
zope.security.interfaces.


Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 26752 - (view) (download) (as text) - [select for diffs]
Modified Sun Jul 25 14:20:25 2004 UTC (8 years, 9 months ago) by jim
File length: 16983 byte(s)
Diff to previous 26591
Removed the special treatment of exception classes.  Previously, we
  treated excptions and xception clases as basic objects that were not
  proxied. This strategy seems overly lax. The problem is that we
  don't really kow how to raise or catch exceptions if exceptions and
  exception classes are proxied. The answer is not to be lax with
  exceptions. Rather, we'll need to change the way exceptions are
  handled in untrusted python code. This will require code
  manipulation, which we've avoided until recently.

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 26591 - (view) (download) (as text) - [select for diffs]
Modified Fri Jul 16 19:51:26 2004 UTC (8 years, 10 months ago) by jim
File length: 17035 byte(s)
Diff to previous 26559
Rearranged the security apis, largely combining security policies and
interactions. Now security policies are just interaction factories --
usually just the interaction class.  

See:

  http://mail.zope.org/pipermail/zope3-dev/2004-July/011656.html

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 26559 - (view) (download) (as text) - [select for diffs]
Modified Thu Jul 15 21:22:32 2004 UTC (8 years, 10 months ago) by srichter
File length: 16823 byte(s)
Diff to previous 26551
Converted as many classes as possible to new style classes.

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 26551 - (view) (download) (as text) - [select for diffs]
Modified Thu Jul 15 07:06:37 2004 UTC (8 years, 10 months ago) by srichter
File length: 16799 byte(s)
Diff to previous 26454
Removed __metaclass__ and made classes inherit 'object'.

Also made most classic classes new-style classes.

Updated module doc strings where appropriate.

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 26454 - (view) (download) (as text) - [select for diffs]
Modified Tue Jul 13 16:28:46 2004 UTC (8 years, 10 months ago) by srichter
File length: 16775 byte(s)
Diff to previous 25920
Converted XXX to TODO.

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 25920 - (view) (download) (as text) - [select for diffs]
Modified Mon Jun 21 14:04:16 2004 UTC (8 years, 11 months ago) by jim
File length: 16773 byte(s)
Diff to previous 25919
Changed basic checkers to use dictionaries.

Now when you create checkers, you must pass one or 
two dictionary objects. We used to allow functions 
to be passed that would be called to get the permission
needed to access a name.  It turns out that this generality
wasn't needed or used.  If we need this in the furture, we
can add custom checkers.  For now, we only allow
dictionaries, as that will enable more efficient checker
implementation. 

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 25919 - (view) (download) (as text) - [select for diffs]
Modified Mon Jun 21 10:56:49 2004 UTC (8 years, 11 months ago) by jim
File length: 16787 byte(s)
Diff to previous 25906
Removed unused NonPrivateChecker


Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 25906 - (view) (download) (as text) - [select for diffs]
Modified Fri Jun 18 15:40:05 2004 UTC (8 years, 11 months ago) by jim
File length: 17044 byte(s)
Diff to previous 25177
Removed the unused DecoratedChecker class.

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 25177 - (view) (download) (as text) - [select for diffs]
Modified Wed Jun 2 13:17:31 2004 UTC (8 years, 11 months ago) by jim
File length: 17829 byte(s)
Diff to previous 24749
Updated to use ZPL 2.1.

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 24749 - (view) (download) (as text) - [select for diffs]
Modified Sun May 16 13:00:21 2004 UTC (9 years ago) by philikon
File length: 17829 byte(s)
Diff to previous 24642
Tell subversion to expand the Id keyword:
  - replaced old CVS expansion with a clean $Id$
  - set the svn:keywords property to "Id"

When you check-in files in the future and want $Id$ to be expanded,
make sure it reads "$Id$" in that file; then set svn:keywords to "Id".

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 24642 - (view) (download) (as text) - [select for diffs]
Modified Fri May 14 10:45:25 2004 UTC (9 years ago) by mgedmin
File length: 17887 byte(s)
Diff to previous 13888
Merged Zope3/branches/mgedmin-security 24595:24640

This is UnificationOfRequestsAndSecurityContextsThroughUse:
  - Security managers and security contexts are gone.
  - Interactions and participations replace them.
  - BaseRequest is now IParticipation.
  - request.user was renamed to request.principal because of the above.


Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 13888 - (view) (download) (as text) - [select for diffs]
Modified Tue May 11 18:24:59 2004 UTC (9 years ago) by root
File length: 17879 byte(s)
Diff to previous 13043
Set mime-type or svn-eol property from cvs expansion data

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 13043 - (view) (download) (as text) - [select for diffs]
Modified Sat Mar 13 17:21:51 2004 UTC (9 years, 2 months ago) by philikon
File length: 17879 byte(s)
Diff to previous 10409
Cleanup.

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 10409 - (view) (download) (as text) - [select for diffs]
Modified Thu Jun 5 11:45:03 2003 UTC (9 years, 11 months ago) by mgedmin
File length: 17901 byte(s)
Diff to previous 10322
Documented the behavior of CombinedChecker explicitly.  Fixed a bug where
CombinedChecker could raise a ForbiddenAttribute instead of Unauthorized.

Documented Checker.permission_id and setattr_permission_id in an interface
(INameBasedChecker).

Remove the dependency on permission_id/setattr_permission_id from
CheckerLoggingMixin.  I do not think anyone cares about the distinction of
'Public' and 'Granted' when debugging checkers.

Make CombinedChecker log things when ZOPE_WATCH_CHECKERS is set.

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 10322 - (view) (download) (as text) - [select for diffs]
Modified Mon Jun 2 17:43:04 2003 UTC (9 years, 11 months ago) by stevea
File length: 17595 byte(s)
Diff to previous 10314
Implemented descriptor for __Security_checker__ of context wrappers.
This descriptor gets a checker for the wrapper and for the proxied object,
and returns a checker combined from both of those.
If either the wrapper or the proxied object has no checker defined, then
the checker for the proxied object or the wrapper is returned,
respectively.
If no checkers are defined, None is returned.

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 10314 - (view) (download) (as text) - [select for diffs]
Modified Mon Jun 2 14:36:04 2003 UTC (9 years, 11 months ago) by stevea
File length: 17398 byte(s)
Diff to previous 10245
Added a CombinedChecker that provides a proxy to two checkers.

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 10245 - (view) (download) (as text) - [select for diffs]
Modified Thu May 29 15:51:19 2003 UTC (9 years, 11 months ago) by stevea
File length: 16012 byte(s)
Diff to previous 10211
Added a DecoratedChecker.

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 10211 - (view) (download) (as text) - [select for diffs]
Modified Wed May 28 17:19:24 2003 UTC (9 years, 11 months ago) by jim
File length: 13574 byte(s)
Diff to previous 10207
renamed zope.proxy.getObject to zope.proxy.getProxiedObject

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 10207 - (view) (download) (as text) - [select for diffs]
Modified Wed May 28 15:49:27 2003 UTC (9 years, 11 months ago) by jim
File length: 13552 byte(s)
Diff to previous 10183
Now getObject comes from zope.proxy

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 10183 - (view) (download) (as text) - [select for diffs]
Modified Wed May 28 12:55:29 2003 UTC (9 years, 11 months ago) by stevea
File length: 13533 byte(s)
Diff to previous 9742
Merged some of the work done by SteveA and MariusG on the
stevea-decorators-branch.

* Refactored acting on WATCH_CHECKERS into a reusable and unobtrusive
  mixin class. Execution speed will be faster when WATCH_CHECKERS is false.

* Improved and clearer implementation of ProxyFactory.

* Added comprehensive test of ProxyFactory.

* Made an explicit TrustedCheckerBase marker type to show the connection
  between the checker module and the proxy module.

* Added a note about the poor naming of _always_available. The name
  _available_by_default would better reflect actual use. That is, it is
  possible to make an _always_available name unavailable.

* Added a BasicTypes_examples dict that can be imported into unit tests
  that want to check whether basic types are handled properly.

* Added comprehensive test of ProxyFactory.

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 9742 - (view) (download) (as text) - [select for diffs]
Modified Wed Apr 23 18:18:02 2003 UTC (10 years, 1 month ago) by stevea
File length: 11189 byte(s)
Diff to previous 9740
Reverted my change as Guido pointed out why exception classes need to
be unwrapped as well as instances. This needs more thinking about
though, as no tests failed...

If all extension instances are unwrapped, and extension classes are
included inline in the code, then there is no problem with comparison.

I'll talk to people and experiment tomorrow, and perhaps re-check this in.

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 9740 - (view) (download) (as text) - [select for diffs]
Modified Wed Apr 23 17:38:49 2003 UTC (10 years, 1 month ago) by stevea
File length: 11276 byte(s)
Diff to previous 9211
Made the checker for ClassType objects more sensible.

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 9211 - (view) (download) (as text) - [select for diffs]
Modified Fri Mar 7 21:13:04 2003 UTC (10 years, 2 months ago) by jim
File length: 11166 byte(s)
Diff to previous 9207
Modified CheckerPublic so that it can be pickled and unpickled without
loss of identity. This is necessary so that it can be stored and used
in persistent objects.

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 9207 - (view) (download) (as text) - [select for diffs]
Modified Fri Mar 7 18:39:44 2003 UTC (10 years, 2 months ago) by jim
File length: 11032 byte(s)
Diff to previous 8683
Changed the marker object, CheckerPublic to be picklable (as a global
object). This will allow the value to be safely stored in persistent
objects.

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 8683 - (view) (download) (as text) - [select for diffs]
Modified Tue Dec 31 03:35:15 2002 UTC (10 years, 4 months ago) by jim
File length: 10710 byte(s)
Diff to previous 8532
More renaming.

Filename: Zope3/trunk/src/zope/security/tests/test_checker.py
Revision 8532 - (view) (download) (as text) - [select for diffs]
Added Wed Dec 25 14:15:36 2002 UTC (10 years, 4 months ago) by jim
File length: 10718 byte(s)
Grand renaming:

- Renamed most files (especially python modules) to lower case.

- Moved views and interfaces into separate hierarchies within each
  project, where each top-level directory under the zope package
  is a separate project.

- Moved everything to src from lib/python.

  lib/python will eventually go away. I need access to the cvs
  repository to make this happen, however.

There are probably some bits that are broken. All tests pass
and zope runs, but I haven't tried everything. There are a number
of cleanups I'll work on tomorrow.

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

  Diffs between and
  Type of Diff should be a

Sort log by:

webmaster@zope.org

Powered by ViewCVS 1.0-dev
(Powered by Apache)

ViewCVS and CVS Help