[Zope] How to properly do navigation Bar without un-authorized
sub-objects?
Tino Wildenhain
tino@wildenhain.de
Tue, 27 Feb 2001 18:40:27 +0100
Hi,
--On Dienstag, 27. Februar 2001 11:29 -0500 Brad Clements
<bkc@murkworks.com> wrote:
> On 27 Feb 2001, at 9:15, Casey Duncan wrote:
>
>> OK, how about if you call AUTHENTICATED_USER.has_permission() on each
>> NavBar method to see if the user has rights to call it?
>
> That does not work either. When I get the object to pass to
> has_permission, authentication kicks in.
>
> Here's what I'm doing
>
>
> /
> Z (folder)
> ShowNavBar Method
>
> Admin (folder) (No rights to this folder)
> ShowNavBar Method
>
> I need to know if the authenticated user (who may be anonymous) has
> rights to view Admin and/or Admin.ShowNavBar
I'm using something like that in my folderish product:
checkPermission=getSecurityManager().checkPermission
for obj in self.objectValues(spec):
if checkPermission('View',obj):
HTH
Tino Wildenhain