[Grok-dev] Grok and permissions
sebastian at urbantalk.se
Sun Jan 13 04:56:35 EST 2008
I think the example looks great!!! However, I would find easier to
follow if each class and method had a text explaining what goes on and
pointing out what (not obvious) design choices you made. You are
showing lots of great techniques that are useful.
What happened to the annotations? Did you remove them for the time
I am not sure that this is too difficult. Basically, you have create a
template/recipe that a newbie can use to get up to speed with user
management. I think that is a good solution because it doesn't hide
the power, but makes it accesible.
Also, I didn't get where you defined the permission
"grok.require('logindemo.ViewMemberListing')", or is that unnecessary?
13 jan 2008 kl. 03.36 skrev Luciano Ramalho:
> 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
>> 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
>> 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.
> PS. I may have missed some opportunity to simplify the code, but no
> one has shown how so far...
> Grok-dev mailing list
> Grok-dev at zope.org
More information about the Grok-dev