[Grok-dev] Re: Protecting views to allow anonymous access only
kaiser at xo7.de
Thu Jul 31 06:31:23 EDT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Dennis Noordsij schrieb:
| Philipp von Weitershausen schreef:
|> Andreas Kaiser wrote:
|>> I'm in the progress of developing my first Grok application, so please
|>> be patient with me and my maybe stupid questions.
|>> Right now I'm stuck with this…
|>> I need to protect a view, so that it can be accessed *only* by
|>> anonymous users.
|> That's going to be hard to impossible to do with Zope's default
| You could do the following:
| In buildout.cfg,
| <unauthenticatedPrincipal id="zope.anybody"
| title="Anonymous user" />
| <grant permission="mysite.Anonymous" principal="zope.anybody" />
| Then you can protect a view with mysite.Anonymous and only not-logged-in
| users can access it.
| (I use it to add a "login", "register", etc viewlet to the default
| Or am I missing the problem?
No, this is *exactly* what I want to achieve.
Thanks everyone for your suggestions, I'll try them ASAP.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the Grok-dev