简体   繁体   中英

Zope z3c.relationfield RelationList and wrong permissions for custom content type

I have a simple content type with a few fields one of which uses RelationList to relate to items of another content type. As a simple user I can create the content type, and select the related items. This is saved ok, however if I edit the content type the list is empty . If I assign the role 'manager' to the user, then if I edit the content type I can see the items (as expected). How can I set the correct permission so that editing as a user would contain the items? I tried to find anything related inside the ZMI and sections as security/workflow/permissions etc but this hasn't worked for me.

Any suggestions highly welcome.

from z3c.relationfield.schema import RelationList

class ILecture(form.Schema):

    form.widget(relatedItems=QuerySourceFieldCheckboxWidget)
    relatedItems = RelationList(
        title=u"Clips",
        description=,
        default=[],
        value_type=RelationChoice(title=_(u"Related"),
                   source=ObjPathSourceBinder(object_provides=IPlumiVideo.__identifier__)),
        required=True,
   )

YG. I've posted that but since I'm not sure how active the project is I post it here too.

正如我write_permission=permissions.ModifyPortalContent我认为您应该在内容字段中使用write_permission=permissions.ModifyPortalContent或类似内容

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM