-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #3477793: Add 'Verified' role for Flexible group, update permis…
…sions
- Loading branch information
Showing
11 changed files
with
162 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...modules/social_group_flexible_group/config/install/group.role.flexible_group-verified.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
langcode: en | ||
status: true | ||
dependencies: | ||
config: | ||
- group.type.flexible_group | ||
id: flexible_group-verified | ||
label: Verified | ||
admin: false | ||
scope: outsider | ||
global_role: verified | ||
group_type: flexible_group | ||
permissions: | ||
- 'access comments' | ||
- 'access posts in group' | ||
- 'join group' | ||
- 'update own group_node:event entity' | ||
- 'update own group_node:topic entity' | ||
- 'view group' | ||
- 'view group_node:event relationship' | ||
- 'view group_node:event entity' | ||
- 'view group_node:topic relationship' | ||
- 'view group_node:topic entity' |
3 changes: 3 additions & 0 deletions
3
...s/social_group_flexible_group/config/update/social_group_flexible_group_update_130006.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
__global_actions: | ||
import_configs: | ||
- group.role.flexible_group-verified |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
tests/behat/features/capabilities/groups/flexible/groups-flexible-page-access.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
@api @javascript | ||
Feature: Validate accessibility of flexible group pages for different users | ||
|
||
Background: | ||
Given I enable the module "social_group_flexible_group" | ||
And I am logged in as an "sitemanager" | ||
And users: | ||
| name | mail | status | roles | | ||
| Behat Owner | behat_owner@example.com | 1 | sitemanager | | ||
| Non Member | non_member@example.com | 1 | | | ||
| Member | member@example.com | 1 | | | ||
|
||
And groups no validation: | ||
| label | type | author | field_flexible_group_visibility | | ||
| Test Flexible | flexible_group | Behat Owner | public | | ||
And group members with values: | ||
| group | user | group_roles | | ||
| Test Flexible | Member | flexible_group-member | | ||
|
||
Scenario: Anonymous user should be redirected to the About page from "Members" and "Stream" pages. | ||
Given I am an anonymous user | ||
|
||
When I go to "/group/1/stream" | ||
|
||
Then the URL should match "^\/group\/[^\/]+\/about$" | ||
|
||
And I go to "/group/1/members" | ||
And the URL should match "^\/group\/[^\/]+\/about$" | ||
|
||
Scenario: Verified user should be redirected to the About page from "Members" and "Stream" pages if he is non-member. | ||
Given I am logged in as "Non Member" | ||
|
||
When I go to "/group/1/stream" | ||
|
||
Then the URL should match "^\/group\/[^\/]+\/about$" | ||
|
||
And I go to "/group/1/members" | ||
And the URL should match "^\/group\/[^\/]+\/about$" | ||
|
||
Scenario: Group member shouldn't be redirected to the About page from "Members" and "Stream" pages. | ||
Given I am logged in as "Member" | ||
|
||
When I go to "/group/1/stream" | ||
|
||
Then the URL should match "^\/group\/[^\/]+\/stream" | ||
|
||
And I go to "/group/1/members" | ||
And the URL should match "^\/group\/[^\/]+\/members$" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters