[Zope] checking permissions
Dieter Maurer
dieter@handshake.de
Wed, 1 May 2002 21:35:58 +0200
A M Thomas writes:
> Things are better - but still not quite right. I'm guessing that
> ValidateValue wants an object rather than a string, since passing it a
> string as returned from context.filtered_manage_options() makes it
> return "False" every time.
As the name suggests, it wants a value not a string it would need
to resolve into a value.
> I found Validate and tried passing the string as the "name" argument,
> with the current context as the "container" argument, but then
> everything gets a "True" value; my dummy user account still gets
> presented with options that can't be used.
In fact, "filtered_manage_options"
(which is "App.Management.Tabs.filtered_manage_options") should do
this automatically.
When it does not, then, probably, there is some bug in your permissions.
Look at its source to learn how to use "validate" (by an example).
Dieter