Hi,

I am building a product for a society that maintains membership,
subscriptions and event registration. Membership to the society requires
keeping track of the usual name/address fields as well as that of a proposer
and a seconder, and a few other fields. But because people can register for
events without becoming a member of the society (and can maybe later become
a member of the society), I decided to keep the society member details in a
non-remember class, called Subscription (Membership was taken).  Given that
members only have Subscriptions and Bookings I made the site a non member
folder site. So I store these objects in their member profile
(portal_memberdata) and now that I'm having permission problems, I'm
questioning the that design decision.

The problems:
When I try create a subscription instance in the member profile (with
at_rename_after_creation = True) I get:
"The currently logged-in user does not have the <b>Copy or Move</b>
permission respective to the object". If I give owner this permission in the
member workflow via the zmi, it works. So I thought I could simply add 'Copy
or Move' to the private state in my setup handlers like this:

    pvt = wf.states.get('private')
    perms = pvt.rolesOfPermission(permission='Copy or Move')
    reg_roles = []
    for perm in perms:
        if perm['selected'] == 'SELECTED':
            reg_roles.append(perm['name'])
    if 'Owner' not in reg_roles:
        reg_roles.append('Owner')
    pvt.manage_permission('Copy or Move', roles=reg_roles, acquire=0)

But that doesn't change the workflow:

I also tried to change the permission in an IObjectInitializedEvent event
handler on member but that didn't work either probably because the owner
doesn't have Change Permissions permission.

I've been sitting with this all day (aaarg) so any pointers will be much
appreciated.

Thanx,
Mike
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to