From 6b180cbb77d6c5bee0e75220d93fc1800d1217df Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 15 Aug 2012 22:49:59 -0400 Subject: - An ``add_permission`` directive method was added to the Configurator. This directive registers a free-standing permission introspectable into the Pyramid introspection system. Frameworks built atop Pyramid can thus use the the ``permissions`` introspectable category data to build a comprehensive list of permissions supported by a running system. Before this method was added, permissions were already registered in this introspectable category as a side effect of naming them in an ``add_view`` call, this method just makes it possible to arrange for a permission to be put into the ``permissions`` introspectable category without naming it along with an associated view. Here's an example of usage of ``add_permission``:: config = Configurator() config.add_permission('view') --- docs/api/config.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/api/config.rst b/docs/api/config.rst index bc9e067b1..1b887988a 100644 --- a/docs/api/config.rst +++ b/docs/api/config.rst @@ -36,6 +36,7 @@ .. automethod:: set_authentication_policy .. automethod:: set_authorization_policy .. automethod:: set_default_permission + .. automethod:: add_permission :methodcategory:`Setting Request Properties` -- cgit v1.2.3