summaryrefslogtreecommitdiff
path: root/repoze/bfg/router.py
AgeCommit message (Collapse)Author
2008-11-15Unused import.Chris McDonough
2008-11-02 FeaturesChris McDonough
- The ``BFG_DEBUG_AUTHORIZATION`` envvar and the ``debug_authorization`` config file value now only imply debugging of view-invoked security checks. Previously, information was printed for every call to ``has_permission`` as well, which made output confusing. To debug ``has_permission`` checks and other manual permission checks, use the debugger and print statements in your own code. - Authorization debugging info is now only present in the HTTP response body oif ``debug_authorization`` is true. - The format of authorization debug messages was improved. - A new ``BFG_DEBUG_NOTFOUND`` envvar was added and a symmetric ``debug_notfound`` config file value was added. When either is true, and a NotFound response is returned by the BFG router (because a view could not be found), debugging information is printed to stderr. When this value is set true, the body of HTTPNotFound responses will also contain the same debugging information. - ``Allowed`` and ``Denied`` responses from the security machinery are now specialized into two types: ACL types, and non-ACL types. The ACL-related responses are instances of ``repoze.bfg.security.ACLAllowed`` and ``repoze.bfg.security.ACLDenied``. The non-ACL-related responses are ``repoze.bfg.security.Allowed`` and ``repoze.bfg.security.Denied``. The allowed-type responses continue to evaluate equal to things that themselves evaluate equal to the ``True`` boolean, while the denied-type responses continue to evaluate equal to things that themselves evaluate equal to the ``False`` boolean. The only difference between the two types is the information attached to them for debugging purposes. - Added a new ``BFG_DEBUG_ALL`` envvar and a symmetric ``debug_all`` config file value. When either is true, all other debug-related flags are set true unconditionally (e.g. ``debug_notfound`` and ``debug_authorization``). Documentation - Added info about debug flag changes. - Added a section to the security chapter named "Debugging Imperative Authorization Failures" (for e.g. ``has_permssion``).
2008-10-30Unused import.Chris McDonough
2008-10-28 - If the ``render_view_to_response`` function was called, if theChris McDonough
view was found and called, but it returned something that did not implement IResponse, the error would pass by unflagged. This was noticed when I created a view function that essentially returned None, but received a NotFound error rather than a ValueError when the view was rendered. This was fixed.
2008-10-03Duplicate import.Chris McDonough
2008-09-30One import per line.Malthe Borch
2008-09-30Formally declare registry attribute.Malthe Borch
2008-09-01 - New API module: ``repoze.bfg.view``. This module contains the functionsChris McDonough
named ``render_view_to_response``, ``render_view_to_iterable`` and ``is_response``, which are documented in the API docs. These features aid programmatic (non-request-driven) view execution.
2008-08-30Make WSGIApplicationEvent test work again.Chris McDonough
2008-08-29Make WSGIApplicationCreatedEvent workChris McDonough
2008-08-29Rejigger and document wsgi app created event.Chris McDonough
2008-08-29We need to dispatch, not notify.Malthe Borch
2008-08-29Added event notification after WSGI application is created and configured.Malthe Borch
2008-08-18 - Generated application differences: ``make_app`` entry pointChris McDonough
renamed to ``app`` in order to have a different name than the bfg function of the same name, to prevent confusion. - Add "options" processing to bfg's ``make_app`` to support runtime options. A new API function named ``get_options`` was added to the registry module. This function is typically used in an application's ``app`` entry point. The Paste config file section for the app can now supply the ``reload_templates`` option, which, if true, will prevent the need to restart the appserver in order for ``z3c.pt`` or XSLT template changes to be detected. - Use only the module name in generated project's "test_suite" (run all tests found in the package). - Default port for generated apps changed from 5432 to 6543 (Postgres default port is 6543).
2008-08-12Fix ITraverserFactory lookup; release 0.2.9.Chris McDonough
2008-07-31 - Add event sends for INewRequest and INewResponse. See theChris McDonough
events.rst chapter in the documentation's ``api`` directory.
2008-07-22Provide the entire environment to the traverser (in anticipation of having ↵Chris McDonough
e.g. Routes traverser).
2008-07-19 - The concept of "view factories" was removed in favor of alwaysChris McDonough
calling a view, which is a callable that returns a response directly (as opposed to returning a view). As a result, the ``factory`` attribute in the bfg:view ZCML statement has been renamed to ``view``. Various interface names were changed also. - ``render_template`` and ``render_transform`` no longer return a Response object. Instead, these return strings. The old behavior can be obtained by using ``render_template_to_response`` and ``render_transform_to_response``.
2008-07-16Doc tweaks.Chris McDonough
2008-07-16Zero in on making docs render properly.Chris McDonough
2008-07-16Security docs.Chris McDonough
2008-07-16Add security.Chris McDonough
2008-07-13Don't stash away the context.Chris McDonough
2008-07-13Use an application-local component registry.Chris McDonough
2008-07-12Speculative: cause routers to accept an app_context (the zcml configuration ↵Chris McDonough
context), so we can later enable an app-local component registry.
2008-07-12Remove unused import.Chris McDonough
Use lemonade index.
2008-07-12(no commit message)Chris McDonough
2008-07-12THe redirect-on-slash story isn't part of the publisher.Chris McDonough
2008-07-11Add security policy checks.Chris McDonough
2008-07-09Uh.Chris McDonough
2008-07-09Provide a policy for doing redirects.Chris McDonough
2008-07-08Redirect on default view if name doesn't end with slash.Chris McDonough
Rejigger sample app, adding more templates.
2008-07-07Depend on z3c.pt.Chris McDonough
Use ZCML to configure applications.
2008-07-07Add a sample app.Chris McDonough
2008-07-07Look up a view after traversal; adapt it to IWSGIApplication.Chris McDonough
2008-07-05Add a plug point for a security policy.Chris McDonough
2008-07-05Use WebOb.Chris McDonough
Return a NotFound when we can't adapt.
2008-07-05IWSGIApplication -> IWSGIApplicationFactoryChris McDonough
The router is not middleware.
2008-07-05policy -> traversal.Chris McDonough
2008-07-04Don't depend on ZODB; shuffle policy responsibilities around a little.Chris McDonough
2008-07-04Start on bfg.Chris McDonough