[Zope3-Users] How to set "excutable" permission for a container ?

Christophe Combelles ccomb at free.fr
Sat Apr 12 08:45:18 EDT 2008


Fet Biz a écrit :
> Hi,
> 
> Suppose "a" is an instance object of class A which implements interface IA,
> in the configiure.zcml, "b" is a view for class A.
> 
> "a" is locked by requiring permission "A.canEdit".
> "b" is intents to be public accessible (zope.Public).
> 
> My problem is that, since "b" is below "a", it's URL is:
> http://host.domain:8080/a/b
> 
> but
> http://host.domain:8080/a

when you just call "a" this way, it's supposed to call a default view such as 
/a/@@index.html or anything else defined as the default view. Otherwise you 
won't be able to publish "a" as is, unless it is publishable itself.

If you want to display "a" through the "b" view, but not through @@index.html 
you just have to allow the first one and disallow the second one. (or even to 
not register index.html at all)

If you have disallowed access to "a" itself but still want "b" to display it, 
you will have to removeSecurityProxy(a) in the b view.

Now, if b is not a view but an object contained in a, this is rather a matter of 
traversing.

Christophe

> 
> is not accessible for public. then http://host.domain:8080/a/b is also 
> not accessible neither.
> although, "zope.Public" is declared in configure.zcml.
> 
> How can I get the "b" to be public? Just like the file permissions in 
> the file system.
> which means, If file "b" contains in folder "a", we can set chmod "o+x" 
> to "a" and "o+r" to "b",
> which results "b" is accessible and "a" is not accessible?
> 
> (The use case is "a" for the membership container, "b" is the membership 
> apply form which should be public to non-members)
> 
> Thanks in advance
> 
> Iap, Singuan
> _______________________________________________
> Zope3-users mailing list
> Zope3-users at zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users
> 
> 



More information about the Zope3-users mailing list