[Zope] has_permission

Florian Mueller floyd@va.com.au
Thu, 05 Aug 1999 13:05:21 +0200


Hi everybody!

I still cannot make has_permission to work.
What I want to do is check whether a file X has permission Y.

In this example, I want to see if the file X, containing this code,
is viewable by the user. What I have been told I should do (thanks!)
is using AUTHENTICATED_USER.has_permission, but I
don't know what arguments I should pass. One is the permission,
e.g. 'View', and the other one should be the file I guess, but how?
None of my guesses work.
Let's say the file is called 'test', why can't I do:

<!--#if "AUTHENTICATED_USER.has_permission('View', test)"-->
nor
<!--#if "AUTHENTICATED_USER.has_permission('View', self)"-->
????????

Any help would be highly appreciated.

Floyd
PS: Please reply also directly to me, because I am not always reading
the list.

--
http://floyd.va.com.au