Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

Hotfix: Isaicp 4589: Allow facilitators to receive a notification as well on a membership request #1253

Merged
merged 3 commits into from
Jun 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions tests/features/collection/collection.member_administration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ Feature: Collection membership administration
| Gregory House | | [email protected] | Gregory | House |
| Kathie Cumbershot | | [email protected] | Kathie | Cumbershot |
| Donald Duck | | [email protected] | Donald | Duck |
| Turkey Ham | | [email protected] | Turkey | Ham |
And the following collections:
| title | description | logo | banner | owner | contact information | closed | state |
| Medical diagnosis | 10 patients in 10 minutes | logo.png | banner.jpg | James Wilson | Princeton-Plainsboro Teaching Hospital | yes | validated |
And the following collection user memberships:
| collection | user | roles | state |
| Medical diagnosis | Lisa Cuddy | administrator, facilitator | active |
| Medical diagnosis | Turkey Ham | facilitator | active |
| Medical diagnosis | Gregory House | | active |
| Medical diagnosis | Kathie Cumbershot | | pending |

Expand All @@ -37,19 +39,29 @@ Feature: Collection membership administration
| recipient | Lisa Cuddy |
| subject | Joinup: A user has requested to join your collection |
| body | Donald Duck has requested to join your collection "Medical diagnosis" as a member. To approve or reject this request, click on |
And the following email should have been sent:
| recipient | Turkey Ham |
| subject | Joinup: A user has requested to join your collection |
| body | Donald Duck has requested to join your collection "Medical diagnosis" as a member. To approve or reject this request, click on |

Scenario: Approve a membership
# Check that a member with pending state does not have access to add new content.
When I am logged in as "Kathie Cumbershot"
And I go to the "Medical diagnosis" collection
Given I am logged in as "Kathie Cumbershot"
When I go to the "Medical diagnosis" collection
Then I should not see the plus button menu
And I should not see the link "Add news"

# Approve a membership.
When I am logged in as "Lisa Cuddy"
And all e-mails have been sent
# Check that the facilitator can also see the approve action.
Given I am logged in as "Turkey Ham"
And I go to the "Medical diagnosis" collection
Then I click "Members" in the "Left sidebar"
Then I select "Approve the pending membership(s)" from "Action"

# Approve a membership.
Given I am logged in as "Lisa Cuddy"
When all e-mails have been sent
And I go to the "Medical diagnosis" collection
And I click "Members" in the "Left sidebar"
# Assert that the user does not see the default OG tab.
Then I should not see the link "Group"
And I check the box "Update the member Kathie Cumbershot"
Expand Down Expand Up @@ -243,10 +255,12 @@ Feature: Collection membership administration
| Gregory House |
| Kathie Cumbershot |
| Lisa Cuddy |
| Turkey Ham |
# By clicking the header of the name column the ordering should be reversed.
When I click "Name"
Then the "member administration" table should contain the following column:
| Name |
| Turkey Ham |
| Lisa Cuddy |
| Kathie Cumbershot |
| Gregory House |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function onCreate(NotificationEvent $event) {
'rdf_entity-collection-administrator' => [
$template_id,
],
'rdf_entity-solution-administrator' => [
'rdf_entity-collection-facilitator' => [
Copy link
Contributor

@pfrenssen pfrenssen Jun 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it is removing the possibility of sending the notifications to solution administrators. I'm not sure if this will affect anything. It is not possible for users to request membership of a solution, but facilitators can add new members at will in order to expand the facilitator team.

The class does not have good documentation explaining what it covers so I am not sure. Let's see what the tests say.

/**
 * Class OgMembershipSubscriber.
 */

👍

Copy link
Contributor Author

@idimopoulos idimopoulos Jun 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Τhere are no membership requests for solutions so the second index is probably wrong and should be rdf_entity-collection-facilitator, thus, making this ticket indeed a bug. There was no spamming question for this issue.

$template_id,
],
],
Expand Down