collective / dexterity.membrane

enables dexterity content items to be used as users and groups in Plone sites
3 stars 14 forks source link

Option to create a member content type object from the Users and Groups controlpanel #32

Closed b4oshany closed 6 years ago

b4oshany commented 6 years ago

I noticed that when I add a new user via Users and Group control panel, there's no dexterity Member object created.

image

This will a problem for sites that allows their users to self-registered. image

Therefore, we need bi-directional creation for the Member and User objects, i.e.

My Hack

For the site I'm working on, I created a form and authorized the unauthorized creation of my dexterity.membrane.JaDMember and override the http://plone.site/register view with the form for JaDMember, which is open to anyone.

        with api.env.adopt_roles('Manager'):
            api.content.create(
                type='dexterity.membrane.JaDMember',
                container=portal,
                id=name,
                first_name=first_name,
                last_name=last_name,
                email=data.get("email"),
                password=data.get("password"),
                safe_id=True
            )

I don't like this solution because it might introduce security issues.

Possible Solution


User = Plone user Member = Dexterity content type that is based on a Plone user


agitator commented 6 years ago

Not sure ... Wasn't it the basic concept to not link those directly? I have a bunch of sites, where membrane users are seen as the "consumers" and plone users are more staff users that more act as reviewers and managers of those sites. Self registration in this case creates membrane users.

b4oshany commented 6 years ago

The setup I have does not create membrane user via self-registration. I believe I did a basic setup.

Note, when I said Plone User, I didn't mean to include the role of the user, but a member account.

On Jan 9, 2018 2:38 AM, "agitator" notifications@github.com wrote:

Not sure ... Wasn't it the basic concept to not link those directly? I have a bunch of sites, where membrane users are seen as the "consumers" and plone users are more staff users that more act as reviewers and managers of those sites. Self registration in this case creates membrane users.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/collective/dexterity.membrane/issues/32#issuecomment-356203665, or mute the thread https://github.com/notifications/unsubscribe-auth/ABvuXgULobgHVTnFooUYee5wJfZ3GatKks5tIxdYgaJpZM4RXQ9w .

b4oshany commented 6 years ago

I find the problem... I didn't enable use email as login under the security controlpanel