[Zope] Setting default view permissions on a product to deny anonymous access
Christian Theune
ct@gocept.com
Wed, 13 Mar 2002 21:03:55 +0100
Hi.
I don't know if this is related, but i had some problems with the
"Owner" role in the last days ...
Did you try to login as a superuser (access) so you get around the security
and took a look how the "real" permissions are set?
Just some guesses ...
Greetings
Christian
* Harry Wilkinson <harryw@nipltd.com> [020311 16:50]:
> Hi all :)
>
> I am developing a product (a kind of CMF site) that should refuse anonymous
> access by default. I would like to write some code for this product so that
> whenever a new instance of it is created, the 'View' permission for that
> instance is set to exclude the role 'Anonymous', and allow the others
> ('Authenticated', 'Member', 'Owner', 'Reviewer', 'Manager').
>
> So far I have played around with manage_permissions and have got:
>
> p.manage_permission('View', ['Authenticated', 'Member', 'Manager', 'Owner',
> 'Reviewer'], acquire=0)
>
> Unfortunately for me, this means that after the site gets created, I am for
> some reason not authorised to access the object. If I set acquire=1 so that
> it will acquire permission settings, then I have no problems with that but
> unauthenticated users can also view it :(
>
> Does anybody know what the usual way of setting default permissions for a
> product is? I don't want to define new permissions, just change the 'view'
> permission.
>
> Thanks : )
>
> Harry
>
--
Christian Theune - ct@gocept.com
gocept gmbh & co.kg - schalaunische strasse 6 - 06366 koethen/anhalt
tel.+49 3496 3099112 - fax.+49 3496 3099118 mob. - 0178 48 33 981
reduce(lambda x,y:x+y,[chr(ord(x)^42) for x in 'zS^BED\nX_FOY\x0b'])