I have a Dexterity-based container that holds inside a Dexterity-based item. I need to let Anonymous users to add objects of this type inside the container.
I already created a rolemap.xml
file with the following:
<?xml version="1.0"?>
<rolemap>
<permissions>
<permission name="my.package: Add My Type" acquire="True">
<role name="Anonymous"/>
</permission>
</permissions>
</rolemap>
I declared the permission on configure.zcml
:
<permission
id="my.package.AddMyType"
title="my.package: Add My Type"
/>
and finally I added a custom add view like this one:
class MyAddView(dexterity.AddForm):
grok.name('MyType')
grok.require('my.package.AddMyType')
the form is already showing up for anonymous users but, when I press the save button I'm redirected to the login form.
also, logged in users are also able to see the form and this is supposed not to be happening.
what else I have to do?