[Grok-dev] Grok and permissions

Luciano Ramalho luciano at ramalho.org
Sat Jan 12 21:36:55 EST 2008


On Jan 13, 2008 12:16 AM, daniel <daniel.carraher at gmail.com> wrote:
> Thanks for pointing out the LoginDemo example. That's more an advanced
> example and it's great for when I start to explore further, but right now
> I'm at a loss how to even begin. I'm not familiar at all with zope,
> interfaces, adapters, schema, formlib etc I was looking for some
> documentation or example code that starts really small and explains
> everything to someone who is starting from scratch. I'll keep this example
> in mind for when I start getting a hang of it though.

Daniel, I'm afraid you will not find a more basic example. I started
LoginDemo to contribute the simplest possible example of how to use
Grok to build an app that allows users to:
- create their own accounts
- login and logout
- see a list of user accounts, but only if they are logged in

But LoginDemo turned out quite complex for such a basic task, and I
believe the problem is in the Zope 3 API. For Grok, this stuff should
be *much* simpler, and that is something that we'll be working on to
improve. But right now, LoginDemo demonstrates in the simplest way
currently possible the two main things you mentioned at the beginning
of this thread:

- "permission checking before views are rendered"
- "how to create or manage user accounts"

The problem as I see it is that Zope 3 is optimized for the hardest
cases, in which a system may have multiple user databases and
authentication mechanisms. Our mission with Grok is to optimize for
the simple cases, but without loss of flexibility. We aren't there yet
regarding user management, but with the help of new users like you we
can find a way.

Regards,

Luciano

PS. I may have missed some opportunity to simplify the code, but no
one has shown how so far...


More information about the Grok-dev mailing list