From 178623bbd8e9aab75b6206ef69f67b62edb3d12e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 28 Jul 2008 05:31:47 +0000 Subject: Tweaks. --- docs/narr/security.rst | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'docs/narr/security.rst') diff --git a/docs/narr/security.rst b/docs/narr/security.rst index 7adeda3b9..36c0b618a 100644 --- a/docs/narr/security.rst +++ b/docs/narr/security.rst @@ -1,10 +1,10 @@ Security ======== -``repoze.bfg`` provides an optional declarative security system that -prevents views that are protected by a :term:`permission` from being -rendered when the user represented by the request does not have the -appropriate level of access in a context. +:mod:`repoze.bfg` provides an optional declarative security system +that prevents views that are protected by a :term:`permission` from +being rendered when the user represented by the request does not have +the appropriate level of access in a context. Security is enabled by adding configuration to your ``configure.zcml`` which specifies a :term:`security policy`. @@ -12,8 +12,8 @@ which specifies a :term:`security policy`. Enabling a Security Policy -------------------------- -By default, ``repoze.bfg`` enables no security policy. All views are -accessible by completely anonymous users. +By default, :mod:`repoze.bfg` enables no security policy. All views +are accessible by completely anonymous users. However, if you add the following bit of code to your application's ``configure.zcml``, you will enable a security policy:: @@ -36,10 +36,11 @@ WSGI server. Protecting Views with Permissions --------------------------------- -You declaratively protected a particular view with a permisson via the -``configure.zcml`` application registry. For example, the following -declaration protects the view named ``add_entry.html`` when invoked -against an ``IBlog`` context with the ``add`` permission:: +You declaratively protected a particular view with a +:term:`permission` via the ``configure.zcml`` application registry. +For example, the following declaration protects the view named +``add_entry.html`` when invoked against an ``IBlog`` context with the +``add`` permission::