Subscribe and unsubscribe routes#268
Conversation
| requirements: | ||
| _permission: 'administer group' | ||
|
|
||
| og_ui.subscribe: |
There was a problem hiding this comment.
as @dawehner and @damiankloip suggested in #59 (comment) , I'll move those routes and the access services to OG core.
| path: 'group/{entity_type_id}/{entity_id}/subscribe/{field_name}' | ||
| defaults: | ||
| _controller: '\Drupal\og\Controller\SubscriptionController::subscribe' | ||
| _title: 'Join Group' |
There was a problem hiding this comment.
This will need to be a callback, as it will be 'Subscribe to group' or 'Request subscription to group` -- according to the group's permissions.
|
Update: I'm going to follow the pattern of |
|
So, yet another issue found by this PR - we didn't add the member role whenever we did |
|
The functional tests are in place. I have moved the permissions from Og UI into OG core, since also the subscribe/ unsubscribe have moved to core itself -as they are such an import part of OG itself. @pfrenssen hope it's ok for you, otherwise let me know. |
|
Ready for review! 😄 |
|
cc @pfrenssen |
|
Awesome work! I don't have time to review this today or this weekend unfortunately. I can take a look at this on Tuesday when I am at Drupalaton. |
| ->setLabel(t('State')) | ||
| ->setDescription(t("The state of the group content.")) | ||
| ->setDefaultValue(TRUE); | ||
| ->setDefaultValue(OgMembershipInterface::STATE_ACTIVE); |
There was a problem hiding this comment.
👍 I also stumbled upon this, this caused a failure in #217.
|
In order not to stop development, I wanted ahead an got it in without a proper review. "Post mortem" review would still be appreciated :) |
A bundle should no longer be marked as a group type after it is deleted
Restarting the great work from #59 , in a shared branch.
PR allows users to subscribe and unsubscribe from groups (
group/node/1/subscribeandgroup/node/1/unsubscribe)