diff --git a/decidim-admin/app/commands/decidim/admin/create_share_token.rb b/decidim-admin/app/commands/decidim/admin/create_share_token.rb index 6de1ebf80aa11..099f4a9c637b5 100644 --- a/decidim-admin/app/commands/decidim/admin/create_share_token.rb +++ b/decidim-admin/app/commands/decidim/admin/create_share_token.rb @@ -37,6 +37,7 @@ def create_share_token token: form.token, expires_at: form.expires_at, token_for: form.token_for, + registered_only: form.registered_only, organization: form.organization, user: form.user } diff --git a/decidim-admin/app/commands/decidim/admin/update_share_token.rb b/decidim-admin/app/commands/decidim/admin/update_share_token.rb index 98f6c584ad76e..26216668afcc8 100644 --- a/decidim-admin/app/commands/decidim/admin/update_share_token.rb +++ b/decidim-admin/app/commands/decidim/admin/update_share_token.rb @@ -38,6 +38,7 @@ def update_share_token { expires_at: form.expires_at, token_for: form.token_for, + registered_only: form.registered_only, organization: form.organization, user: form.user } diff --git a/decidim-admin/app/packs/stylesheets/decidim/admin/utils/_utilities.scss b/decidim-admin/app/packs/stylesheets/decidim/admin/utils/_utilities.scss index 89c0f9d0bb9ed..064a801b9f85b 100644 --- a/decidim-admin/app/packs/stylesheets/decidim/admin/utils/_utilities.scss +++ b/decidim-admin/app/packs/stylesheets/decidim/admin/utils/_utilities.scss @@ -1,4 +1,4 @@ -.sr-only { +.sr-only{ width: 1px; height: 1px; position: absolute; diff --git a/decidim-assemblies/app/permissions/decidim/assemblies/permissions.rb b/decidim-assemblies/app/permissions/decidim/assemblies/permissions.rb index 4db9e471fb374..3836a05a3cf73 100644 --- a/decidim-assemblies/app/permissions/decidim/assemblies/permissions.rb +++ b/decidim-assemblies/app/permissions/decidim/assemblies/permissions.rb @@ -287,6 +287,7 @@ def org_admin_action? :assembly_member, :space_private_user, :export_space, + :assemblies_setting, :share_tokens, :import ].include?(permission_action.subject) diff --git a/decidim-assemblies/config/locales/en.yml b/decidim-assemblies/config/locales/en.yml index 41b484ab830f7..2a9db117988a7 100644 --- a/decidim-assemblies/config/locales/en.yml +++ b/decidim-assemblies/config/locales/en.yml @@ -207,7 +207,7 @@ en: components: Components info: Info moderations: Moderations - private_users: Private participants + private_users: Private users see_assembly: See assembly assemblies_types: Assemblies types models: diff --git a/decidim-core/lib/decidim/core/test/shared_examples/manage_share_tokens_examples.rb b/decidim-core/lib/decidim/core/test/shared_examples/manage_share_tokens_examples.rb index deba9c1770d64..7ed38085d50dc 100644 --- a/decidim-core/lib/decidim/core/test/shared_examples/manage_share_tokens_examples.rb +++ b/decidim-core/lib/decidim/core/test/shared_examples/manage_share_tokens_examples.rb @@ -51,10 +51,10 @@ find_by_id("share_token_no_expiration_false").click find_by_id("share_token_registered_only_true").click click_on "Create" - expect(page).to have_content("cannot be blank", count: 2) + expect(page).to have_content("can't be blank", count: 2) fill_in "share_token_token", with: " custom token " - fill_in "share_token_expires_at", with: 1.day.from_now, visible: :all + fill_in "share_token_expires_at", with: 1.day.from_now.strftime("%d/%m/%Y %H:%M"), visible: :all click_on "Create" expect(page).to have_content("Token created successfully") @@ -94,6 +94,8 @@ end it "can edit a share token" do + token_to_edit = find("tbody tr:first-child td:first-child").text.strip + within "tbody tr:first-child td:nth-child(3)" do expect(page).to have_content("Yes") end @@ -105,17 +107,16 @@ find_by_id("share_token_no_expiration_false").click find_by_id("share_token_registered_only_false").click click_on "Update" - expect(page).to have_content("cannot be blank", count: 1) - fill_in "share_token_expires_at", with: 1.day.from_now, visible: :all + expect(page).to have_content("can't be blank", count: 1) + + fill_in "share_token_expires_at", with: 1.day.from_now.strftime("%d/%m/%Y %H:%M"), visible: :all click_on "Update" expect(page).to have_content("Token updated successfully") expect(page).to have_css("tbody tr", count: 3) - within "tbody tr:first-child td:nth-child(2)" do + within "tbody tr", text: token_to_edit do expect(page).to have_content(1.day.from_now.strftime("%d/%m/%Y %H:%M")) - end - within "tbody tr:first-child td:nth-child(3)" do expect(page).to have_content("No") end end