From 93a4f5df2f74e4cbefc70733f2c0258859207106 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 5 Jul 2008 02:59:04 +0000 Subject: Add a plug point for a security policy. --- repoze/bfg/interfaces.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'repoze/bfg/interfaces.py') diff --git a/repoze/bfg/interfaces.py b/repoze/bfg/interfaces.py index 803cf237a..b0b769b02 100644 --- a/repoze/bfg/interfaces.py +++ b/repoze/bfg/interfaces.py @@ -11,6 +11,11 @@ class IRootPolicy(Interface): class ITraversalPolicy(Interface): def __call__(environ, root): """ Return a tuple in the form (context, name, subpath) """ + +class ISecurityPolicy(Interface): + def __call__(environ, context, name): + """ Return a WSGI app on unauthorized or None to signify that + the request is allowed to continue """ class ITraverser(Interface): def __init__(context): -- cgit v1.2.3