diff --git a/config/sync/field.field.paragraph.json_map.field_json.yml b/config/sync/field.field.paragraph.json_map.field_json.yml index fc3fef4fbb..e10e372ecc 100644 --- a/config/sync/field.field.paragraph.json_map.field_json.yml +++ b/config/sync/field.field.paragraph.json_map.field_json.yml @@ -12,7 +12,7 @@ field_name: field_json entity_type: paragraph bundle: json_map label: JSON -description: 'Enter a JSON serialized string representing the map.' +description: 'Enter a JSON serialized string representing the map, or use the Basic map (BMAP) wizard to create one.' required: true translatable: false default_value: { } diff --git a/config/sync/og.og_role.rdf_entity-collection-facilitator.yml b/config/sync/og.og_role.rdf_entity-collection-facilitator.yml index 203674d735..627db1ef9a 100644 --- a/config/sync/og.og_role.rdf_entity-collection-facilitator.yml +++ b/config/sync/og.og_role.rdf_entity-collection-facilitator.yml @@ -27,10 +27,7 @@ permissions: - 'create event content' - 'create glossary content' - 'create news content' - - 'create paragraph content accordion' - - 'create paragraph content accordion_item' - - 'create paragraph content content_listing' - - 'create paragraph content simple_paragraph' + - 'create paragraph content json_map' - 'create rdf entity news' - 'create solution rdf_entity' - 'delete any custom_page content' @@ -41,10 +38,7 @@ permissions: - 'delete any glossary content' - 'delete any news content' - 'delete contact_information rdf entity' - - 'delete paragraph content accordion' - - 'delete paragraph content accordion_item' - - 'delete paragraph content content_listing' - - 'delete paragraph content simple_paragraph' + - 'delete paragraph content json_map' - 'edit any custom_page content' - 'edit any discussion content' - 'edit any document content' @@ -149,10 +143,7 @@ permissions: - 'update any navigation ogmenu_instance' - 'update collection_settings meta-entity' - 'update group' - - 'update paragraph content accordion' - - 'update paragraph content accordion_item' - - 'update paragraph content content_listing' - - 'update paragraph content simple_paragraph' + - 'update paragraph content json_map' - 'view all revisions' - 'view any tallinn_report content' - 'view any unpublished content' diff --git a/config/sync/og.og_role.rdf_entity-solution-facilitator.yml b/config/sync/og.og_role.rdf_entity-solution-facilitator.yml index 154e3d95ca..b9e787b17f 100644 --- a/config/sync/og.og_role.rdf_entity-solution-facilitator.yml +++ b/config/sync/og.og_role.rdf_entity-solution-facilitator.yml @@ -24,10 +24,6 @@ permissions: - 'create event content' - 'create glossary content' - 'create news content' - - 'create paragraph content accordion' - - 'create paragraph content accordion_item' - - 'create paragraph content content_listing' - - 'create paragraph content simple_paragraph' - 'delete any asset_distribution rdf_entity' - 'delete any custom_page content' - 'delete any discussion content' @@ -36,10 +32,6 @@ permissions: - 'delete any news content' - 'delete asset_distribution rdf entity' - 'delete contact_information rdf entity' - - 'delete paragraph content accordion' - - 'delete paragraph content accordion_item' - - 'delete paragraph content content_listing' - - 'delete paragraph content simple_paragraph' - 'edit any custom_page content' - 'edit any discussion content' - 'edit any glossary content' @@ -143,10 +135,6 @@ permissions: - 'update group' - 'update own asset_distribution rdf_entity' - 'update own asset_release rdf_entity' - - 'update paragraph content accordion' - - 'update paragraph content accordion_item' - - 'update paragraph content content_listing' - - 'update paragraph content simple_paragraph' - 'view all revisions' - 'view any unpublished content' - 'view rdf entity' diff --git a/config/sync/user.role.authenticated.yml b/config/sync/user.role.authenticated.yml index f97753a371..dd7e94543a 100644 --- a/config/sync/user.role.authenticated.yml +++ b/config/sync/user.role.authenticated.yml @@ -16,8 +16,16 @@ permissions: - 'create contact_information rdf entity' - 'create document content' - 'create owner rdf entity' + - 'create paragraph content accordion' + - 'create paragraph content accordion_item' + - 'create paragraph content content_listing' + - 'create paragraph content simple_paragraph' - 'delete own comments' - 'delete own document content' + - 'delete paragraph content accordion' + - 'delete paragraph content accordion_item' + - 'delete paragraph content content_listing' + - 'delete paragraph content simple_paragraph' - 'edit own comments' - 'edit own contact_information rdf entity' - 'edit own owner rdf entity' @@ -90,6 +98,10 @@ permissions: - 'transition own node news from validated to validated using the community_content - node:post_moderated workflow' - 'unflag subscribe_discussions' - 'update own document content' + - 'update paragraph content accordion' + - 'update paragraph content accordion_item' + - 'update paragraph content content_listing' + - 'update paragraph content simple_paragraph' - 'use text format basic_html' - 'use text format content_editor' - 'use text format glossary_html' diff --git a/config/sync/user.role.moderator.yml b/config/sync/user.role.moderator.yml index 508822ad1e..3f15b5788f 100644 --- a/config/sync/user.role.moderator.yml +++ b/config/sync/user.role.moderator.yml @@ -52,12 +52,8 @@ permissions: - 'create licence rdf entity' - 'create news_banner media' - 'create news_logo media' - - 'create paragraph content accordion' - - 'create paragraph content accordion_item' - - 'create paragraph content content_listing' - 'create paragraph content iframe' - 'create paragraph content json_map' - - 'create paragraph content simple_paragraph' - 'create rdf entity news' - 'create solution releases' - 'create solution_banner media' @@ -73,24 +69,15 @@ permissions: - 'delete any solution_logo media' - 'delete asset_release rdf entity' - 'delete contact_information rdf entity' - - 'delete contact_information rdf entity' - - 'delete licence rdf entity' - 'delete licence rdf entity' - 'delete owner rdf entity' - - 'delete owner rdf entity' - - 'delete paragraph content accordion' - - 'delete paragraph content accordion_item' - - 'delete paragraph content content_listing' - 'delete paragraph content iframe' - 'delete paragraph content json_map' - - 'delete paragraph content simple_paragraph' - 'delete site alerts' - 'download subscribers report' - 'edit any collection_banner media' - 'edit any collection_logo media' - 'edit any custom_page content' - - 'edit any custom_page content' - - 'edit any discussion content' - 'edit any discussion content' - 'edit any event_banner media' - 'edit any event_logo media' @@ -236,12 +223,8 @@ permissions: - 'unpin entity' - 'update any simple_block block content' - 'update collection_settings meta-entity' - - 'update paragraph content accordion' - - 'update paragraph content accordion_item' - - 'update paragraph content content_listing' - 'update paragraph content iframe' - 'update paragraph content json_map' - - 'update paragraph content simple_paragraph' - 'update site alerts' - 'view any unpublished content' - 'view field_is_eif_category' diff --git a/tests/features/paragraphs/custom_page.paragraphs.feature b/tests/features/paragraphs/custom_page.paragraphs.feature index ceec4c33d3..8c73698c0a 100644 --- a/tests/features/paragraphs/custom_page.paragraphs.feature +++ b/tests/features/paragraphs/custom_page.paragraphs.feature @@ -44,22 +44,37 @@ Feature: | BBBBBBBBBB | | AAAAAAAAAA | - Scenario: Moderators can add a map and/or an iframe paragraph. - Given custom_page content: - | title | body | collection | - | Don't Mess with the Zohan | Wanna mess? | Paragraphs collection | + Scenario: Privileged users can add a map and/or an iframe and map paragraph. + Given users: + | Username | + | Zohan | + And the following collection user membership: + | collection | user | + | Paragraphs collection | Zohan | + And custom_page content: + | title | body | collection | author | + | Don't Mess with the Zohan | Wanna mess? | Paragraphs collection | Zohan | + + # Normal members cannot add maps. + When I am logged in as "Zohan" + And I go to the custom_page "Don't Mess with the Zohan" edit screen + Then I should see the button "Add Simple paragraph" + And I should not see the button "Add Map" + But I should not see the button "Add IFrame" - Given I am logged in as a facilitator of the "Paragraphs collection" collection + # Facilitators can add maps. + When I am logged in as a facilitator of the "Paragraphs collection" collection And I go to the custom_page "Don't Mess with the Zohan" edit screen Then I should see the button "Add Simple paragraph" - But I should not see the button "Add Map" - And I should not see the button "Add IFrame" + And I should see the button "Add Map" + But I should not see the button "Add IFrame" When I fill in "Body" with "I'm half Australian, half Mt. Everest" And I press "Save" Then I should see the success message "Custom page Don't Mess with the Zohan has been updated." And I should see "I'm half Australian, half Mt. Everest" + # Moderators can add maps. Given I am logged in as a moderator And I go to the custom_page "Don't Mess with the Zohan" edit screen Then I should see the button "Add Simple paragraph"