From bb800f2cd7424c6280a7346303963d0f0daed935 Mon Sep 17 00:00:00 2001 From: Julien MIOTTE Date: Fri, 3 Jun 2016 09:20:14 +0200 Subject: Adding a warning discouraging use of __acl__ properties attributes --- docs/narr/security.rst | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs/narr') diff --git a/docs/narr/security.rst b/docs/narr/security.rst index 7cbea113c..842aad23f 100644 --- a/docs/narr/security.rst +++ b/docs/narr/security.rst @@ -290,6 +290,13 @@ properties of the instance. def __init__(self, owner): self.owner = owner +.. warning:: + + Writing ``__acl__`` as properties is discouraged, as AttributeErrors + occuring in ``fget`` or ``fset`` will be silently dismissed (this is consistent + with Python ``getattr`` and ``hasattr`` behaviors). For dynamic ACLs, simply use + callables, as documented above. + .. index:: single: ACE single: access control entry -- cgit v1.2.3 From dd09252dedf58f2b40a32e1d1fec76595bb0f775 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Thu, 9 Jun 2016 01:24:07 -0700 Subject: grammar, spelling, wrapping fix --- docs/narr/security.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'docs/narr') diff --git a/docs/narr/security.rst b/docs/narr/security.rst index 842aad23f..77e7fd707 100644 --- a/docs/narr/security.rst +++ b/docs/narr/security.rst @@ -292,10 +292,11 @@ properties of the instance. .. warning:: - Writing ``__acl__`` as properties is discouraged, as AttributeErrors - occuring in ``fget`` or ``fset`` will be silently dismissed (this is consistent - with Python ``getattr`` and ``hasattr`` behaviors). For dynamic ACLs, simply use - callables, as documented above. + Writing ``__acl__`` as properties is discouraged because an + ``AttributeError`` occurring in ``fget`` or ``fset`` will be silently + dismissed (this is consistent with Python ``getattr`` and ``hasattr`` + behaviors). For dynamic ACLs, simply use callables, as documented above. + .. index:: single: ACE -- cgit v1.2.3 From 49783e1f9b3b42721c02b7253002826d6f25c79a Mon Sep 17 00:00:00 2001 From: dowwie Date: Mon, 20 Jun 2016 11:33:07 -0400 Subject: typo fix within urldispatch narrative, example 2 --- docs/narr/urldispatch.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/narr') diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst index 2472ace31..7d37c04df 100644 --- a/docs/narr/urldispatch.rst +++ b/docs/narr/urldispatch.rst @@ -557,7 +557,7 @@ Here is an example of a corresponding ``mypackage.views`` module: @view_config(route_name='idea') def idea_view(request): - return Response(request.matchdict['id']) + return Response(request.matchdict['idea']) @view_config(route_name='user') def user_view(request): -- cgit v1.2.3