Pylons/pyramid — Issue #398: docs: Narrative doc says ACLAuthorizationPolicy is used by default
Author: xrotwang
Created: 2012-01-10 06:24:48+00:00
State: open

http://readthedocs.org/docs/pyramid/en/latest/narr/security.html#creating-your-own-authorization-policy reads:

By default, Pyramid will use the pyramid.authorization.ACLAuthorizationPolicy if an authentication policy is activated and an authorization policy isn’t otherwise specified.

which is not the case:

>>> from pyramid.config import Configurator
>>> config = Configurator()
>>> from pyramid.authentication import AuthTktAuthenticationPolicy
>>> config.set_authentication_policy(AuthTktAuthenticationPolicy('secret'))
>>> config.commit()
Traceback (most recent call last):
File "", line 1, in
File "lib/python2.6/site-packages/pyramid/config/__init__.py", line 589, in commit
self.action_state.execute_actions(introspector=self.introspector)
File "lib/python2.6/site-packages/pyramid/config/__init__.py", line 1030, in execute_actions
tb)
File "lib/python2.6/site-packages/pyramid/config/__init__.py", line 1022, in execute_actions
callable(*args, **kw)
File "lib/python2.6/site-packages/pyramid/config/security.py", line 31, in register
'Cannot configure an authentication policy without '
pyramid.exceptions.ConfigurationExecutionError