amitaibu / og

A fork to work on OG8
https://github.com/Gizra/og
29 stars 16 forks source link

Prevent OgMemberships to be created with the 'non-member' and 'member' role #293

Closed pfrenssen closed 7 years ago

pfrenssen commented 7 years ago

Currently it is possible to create OgMembership entities in which the user has the 'non-member' role.

We should throw an exception when someone tries to sneak in the OgRoleInterface::ANONYMOUS role.

This was suggested by @amitaibu in https://github.com/amitaibu/og/pull/217#discussion_r73567630 but has been split off to a separate ticket.

amitaibu commented 7 years ago

I've updated title to also include the member role. Like in Drupal core, a user isn't saved with the authenticated role -- it's implied by it being a user.

dakala commented 7 years ago

@amitaibu Is this ticket still valid?

amitaibu commented 7 years ago

Yeah, you can keep open until your PR will get in.

dakala commented 7 years ago

https://github.com/Gizra/og/pull/174