decidim-admin 0.27.3 → 0.27.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/app/commands/decidim/admin/block_user.rb +7 -2
  3. data/app/controllers/concerns/decidim/admin/needs_admin_tos_accepted.rb +78 -0
  4. data/app/controllers/concerns/decidim/moderations/admin/filterable.rb +4 -0
  5. data/app/controllers/decidim/admin/admin_terms_controller.rb +1 -1
  6. data/app/controllers/decidim/admin/application_controller.rb +1 -0
  7. data/app/controllers/decidim/admin/static_page_topics_controller.rb +1 -3
  8. data/app/forms/decidim/admin/organization_form.rb +2 -2
  9. data/app/packs/stylesheets/decidim/admin/_variables.scss +1 -1
  10. data/app/views/decidim/admin/area_types/edit.html.erb +1 -0
  11. data/app/views/decidim/admin/area_types/index.html.erb +1 -0
  12. data/app/views/decidim/admin/area_types/new.html.erb +1 -0
  13. data/app/views/decidim/admin/areas/edit.html.erb +1 -0
  14. data/app/views/decidim/admin/areas/index.html.erb +1 -0
  15. data/app/views/decidim/admin/areas/new.html.erb +1 -0
  16. data/app/views/decidim/admin/attachment_collections/edit.html.erb +1 -0
  17. data/app/views/decidim/admin/attachment_collections/index.html.erb +1 -0
  18. data/app/views/decidim/admin/attachment_collections/new.html.erb +1 -0
  19. data/app/views/decidim/admin/attachments/edit.html.erb +1 -0
  20. data/app/views/decidim/admin/attachments/index.html.erb +1 -0
  21. data/app/views/decidim/admin/attachments/new.html.erb +1 -0
  22. data/app/views/decidim/admin/authorization_workflows/index.html.erb +1 -0
  23. data/app/views/decidim/admin/categories/edit.html.erb +1 -0
  24. data/app/views/decidim/admin/categories/index.html.erb +1 -0
  25. data/app/views/decidim/admin/categories/new.html.erb +1 -0
  26. data/app/views/decidim/admin/components/_actions.html.erb +43 -0
  27. data/app/views/decidim/admin/components/_component.html.erb +3 -41
  28. data/app/views/decidim/admin/components/edit.html.erb +1 -0
  29. data/app/views/decidim/admin/components/index.html.erb +1 -0
  30. data/app/views/decidim/admin/components/new.html.erb +1 -1
  31. data/app/views/decidim/admin/conflicts/index.html.erb +1 -0
  32. data/app/views/decidim/admin/help_sections/show.erb +1 -0
  33. data/app/views/decidim/admin/impersonatable_users/index.html.erb +1 -0
  34. data/app/views/decidim/admin/impersonations/new.html.erb +1 -0
  35. data/app/views/decidim/admin/logs/index.html.erb +1 -0
  36. data/app/views/decidim/admin/moderated_users/index.html.erb +1 -0
  37. data/app/views/decidim/admin/moderations/index.html.erb +1 -0
  38. data/app/views/decidim/admin/newsletter_templates/index.html.erb +1 -0
  39. data/app/views/decidim/admin/newsletter_templates/show.html.erb +1 -0
  40. data/app/views/decidim/admin/newsletters/index.html.erb +1 -0
  41. data/app/views/decidim/admin/newsletters/new.html.erb +1 -0
  42. data/app/views/decidim/admin/newsletters/show.html.erb +1 -0
  43. data/app/views/decidim/admin/officializations/index.html.erb +1 -0
  44. data/app/views/decidim/admin/officializations/new.html.erb +1 -0
  45. data/app/views/decidim/admin/organization/edit.html.erb +1 -0
  46. data/app/views/decidim/admin/organization_appearance/edit.html.erb +1 -0
  47. data/app/views/decidim/admin/organization_external_domain_whitelist/edit.html.erb +1 -0
  48. data/app/views/decidim/admin/scope_types/edit.html.erb +1 -0
  49. data/app/views/decidim/admin/scope_types/index.html.erb +1 -0
  50. data/app/views/decidim/admin/scope_types/new.html.erb +1 -0
  51. data/app/views/decidim/admin/scopes/edit.html.erb +1 -0
  52. data/app/views/decidim/admin/scopes/index.html.erb +1 -0
  53. data/app/views/decidim/admin/scopes/new.html.erb +1 -0
  54. data/app/views/decidim/admin/shared/landing_page_content_blocks/edit.html.erb +1 -0
  55. data/app/views/decidim/admin/static_page_topics/edit.html.erb +1 -0
  56. data/app/views/decidim/admin/static_page_topics/new.html.erb +1 -0
  57. data/app/views/decidim/admin/static_pages/edit.html.erb +1 -0
  58. data/app/views/decidim/admin/static_pages/index.html.erb +1 -0
  59. data/app/views/decidim/admin/static_pages/new.html.erb +1 -0
  60. data/app/views/decidim/admin/user_groups/index.html.erb +1 -0
  61. data/app/views/decidim/admin/user_groups_csv_verifications/new.html.erb +1 -0
  62. data/app/views/decidim/admin/users/index.html.erb +1 -0
  63. data/app/views/decidim/admin/users/new.html.erb +1 -0
  64. data/app/views/layouts/decidim/admin/global_moderations.html.erb +1 -0
  65. data/config/environment.rb +3 -0
  66. data/config/locales/ar.yml +8 -13
  67. data/config/locales/bg.yml +0 -1
  68. data/config/locales/ca.yml +12 -9
  69. data/config/locales/cs.yml +9 -6
  70. data/config/locales/de.yml +34 -27
  71. data/config/locales/el.yml +82 -12
  72. data/config/locales/en.yml +6 -3
  73. data/config/locales/es-MX.yml +12 -9
  74. data/config/locales/es-PY.yml +12 -9
  75. data/config/locales/es.yml +12 -9
  76. data/config/locales/eu.yml +317 -286
  77. data/config/locales/fi-plain.yml +8 -5
  78. data/config/locales/fi.yml +9 -6
  79. data/config/locales/fr-CA.yml +12 -9
  80. data/config/locales/fr.yml +15 -12
  81. data/config/locales/ga-IE.yml +0 -1
  82. data/config/locales/gl.yml +2 -13
  83. data/config/locales/hu.yml +2 -12
  84. data/config/locales/id-ID.yml +3 -8
  85. data/config/locales/is-IS.yml +1 -3
  86. data/config/locales/it.yml +0 -11
  87. data/config/locales/ja.yml +13 -10
  88. data/config/locales/kaa.yml +216 -0
  89. data/config/locales/lb.yml +2 -13
  90. data/config/locales/lt.yml +31 -13
  91. data/config/locales/lv.yml +0 -10
  92. data/config/locales/nl.yml +2 -13
  93. data/config/locales/no.yml +0 -11
  94. data/config/locales/pl.yml +31 -6
  95. data/config/locales/pt-BR.yml +110 -11
  96. data/config/locales/pt.yml +3 -14
  97. data/config/locales/ro-RO.yml +2 -13
  98. data/config/locales/ru.yml +3 -9
  99. data/config/locales/sk.yml +0 -11
  100. data/config/locales/sl.yml +0 -1
  101. data/config/locales/sq-AL.yml +66 -0
  102. data/config/locales/sr-CS.yml +10 -6
  103. data/config/locales/sv.yml +1 -11
  104. data/config/locales/th-TH.yml +1 -0
  105. data/config/locales/tr-TR.yml +8 -14
  106. data/config/locales/uk.yml +1 -9
  107. data/config/locales/zh-CN.yml +0 -11
  108. data/config/locales/zh-TW.yml +0 -11
  109. data/config/routes.rb +2 -0
  110. data/lib/decidim/admin/form_builder.rb +1 -2
  111. data/lib/decidim/admin/test/admin_participatory_space_access_examples.rb +49 -0
  112. data/lib/decidim/admin/test/needs_admin_tos_accepted_examples.rb +9 -0
  113. data/lib/decidim/admin/test.rb +1 -0
  114. data/lib/decidim/admin/version.rb +1 -1
  115. metadata +25 -12
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ shared_examples "accessing the participatory space" do
4
+ it "shows the page" do
5
+ expect(page).to have_content("View public page")
6
+ expect(page).to have_content("My space")
7
+ end
8
+ end
9
+
10
+ shared_examples "showing the unauthorized error message" do
11
+ it "redirects to the relevant unauthorized page" do
12
+ expect(page).to have_content("You are not authorized to perform this action")
13
+ expect(page).to have_current_path("/admin/")
14
+ end
15
+ end
16
+
17
+ shared_examples "admin participatory space access" do
18
+ before do
19
+ switch_to_host(organization.host)
20
+ login_as user, scope: :user
21
+ end
22
+
23
+ context "when the user is a normal user" do
24
+ let(:user) { create(:user, :confirmed, organization: organization) }
25
+ let(:unauthorized_path) { "/" }
26
+
27
+ it_behaves_like "a 404 page"
28
+ end
29
+
30
+ context "when the user has the role" do
31
+ let(:user) { role }
32
+
33
+ context "and has permission" do
34
+ before do
35
+ visit target_path
36
+ end
37
+
38
+ it_behaves_like "accessing the participatory space"
39
+ end
40
+
41
+ context "and does not have permission" do
42
+ before do
43
+ visit unauthorized_target_path
44
+ end
45
+
46
+ it_behaves_like "showing the unauthorized error message"
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ shared_examples_for "needs admin TOS accepted" do
4
+ context "when the user has not accepted the admin TOS" do
5
+ it "shows a message to accept the admin TOS" do
6
+ expect(page).to have_content("Please take a moment to review Admin Terms of Use")
7
+ end
8
+ end
9
+ end
@@ -9,3 +9,4 @@ require "decidim/admin/test/manage_paginated_collection_examples"
9
9
  require "decidim/admin/test/filterable_examples"
10
10
  require "decidim/admin/test/filters_participatory_space_users_examples"
11
11
  require "decidim/admin/test/filters_participatory_space_user_roles_examples"
12
+ require "decidim/admin/test/needs_admin_tos_accepted_examples"
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-admin version.
5
5
  module Admin
6
6
  def self.version
7
- "0.27.3"
7
+ "0.27.5"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.3
4
+ version: 0.27.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
8
8
  - Marc Riera Casals
9
9
  - Oriol Gual Oliva
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-05-11 00:00:00.000000000 Z
13
+ date: 2023-12-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: active_link_to
@@ -32,14 +32,14 @@ dependencies:
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.27.3
35
+ version: 0.27.5
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.27.3
42
+ version: 0.27.5
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: devise
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -75,6 +75,9 @@ dependencies:
75
75
  - - "~>"
76
76
  - !ruby/object:Gem::Version
77
77
  version: '2.0'
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: 2.0.9
78
81
  type: :runtime
79
82
  prerelease: false
80
83
  version_requirements: !ruby/object:Gem::Requirement
@@ -82,34 +85,37 @@ dependencies:
82
85
  - - "~>"
83
86
  - !ruby/object:Gem::Version
84
87
  version: '2.0'
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: 2.0.9
85
91
  - !ruby/object:Gem::Dependency
86
92
  name: decidim-dev
87
93
  requirement: !ruby/object:Gem::Requirement
88
94
  requirements:
89
95
  - - '='
90
96
  - !ruby/object:Gem::Version
91
- version: 0.27.3
97
+ version: 0.27.5
92
98
  type: :development
93
99
  prerelease: false
94
100
  version_requirements: !ruby/object:Gem::Requirement
95
101
  requirements:
96
102
  - - '='
97
103
  - !ruby/object:Gem::Version
98
- version: 0.27.3
104
+ version: 0.27.5
99
105
  - !ruby/object:Gem::Dependency
100
106
  name: decidim-participatory_processes
101
107
  requirement: !ruby/object:Gem::Requirement
102
108
  requirements:
103
109
  - - '='
104
110
  - !ruby/object:Gem::Version
105
- version: 0.27.3
111
+ version: 0.27.5
106
112
  type: :development
107
113
  prerelease: false
108
114
  version_requirements: !ruby/object:Gem::Requirement
109
115
  requirements:
110
116
  - - '='
111
117
  - !ruby/object:Gem::Version
112
- version: 0.27.3
118
+ version: 0.27.5
113
119
  description: Organization administration to manage a single organization.
114
120
  email:
115
121
  - josepjaume@gmail.com
@@ -198,6 +204,7 @@ files:
198
204
  - app/controllers/concerns/decidim/admin/global_moderation_context.rb
199
205
  - app/controllers/concerns/decidim/admin/landing_page.rb
200
206
  - app/controllers/concerns/decidim/admin/landing_page_content_blocks.rb
207
+ - app/controllers/concerns/decidim/admin/needs_admin_tos_accepted.rb
201
208
  - app/controllers/concerns/decidim/admin/officializations/filterable.rb
202
209
  - app/controllers/concerns/decidim/admin/paginable.rb
203
210
  - app/controllers/concerns/decidim/admin/participatory_space_admin_context.rb
@@ -470,6 +477,7 @@ files:
470
477
  - app/views/decidim/admin/categories/index.html.erb
471
478
  - app/views/decidim/admin/categories/new.html.erb
472
479
  - app/views/decidim/admin/categories/show.html.erb
480
+ - app/views/decidim/admin/components/_actions.html.erb
473
481
  - app/views/decidim/admin/components/_component.html.erb
474
482
  - app/views/decidim/admin/components/_form.html.erb
475
483
  - app/views/decidim/admin/components/_settings_fields.html.erb
@@ -581,6 +589,7 @@ files:
581
589
  - app/views/layouts/decidim/admin/users.html.erb
582
590
  - config/assets.rb
583
591
  - config/brakeman.ignore
592
+ - config/environment.rb
584
593
  - config/locales/am-ET.yml
585
594
  - config/locales/ar-SA.yml
586
595
  - config/locales/ar.yml
@@ -647,9 +656,11 @@ files:
647
656
  - config/locales/sk.yml
648
657
  - config/locales/sl.yml
649
658
  - config/locales/so-SO.yml
659
+ - config/locales/sq-AL.yml
650
660
  - config/locales/sr-CS.yml
651
661
  - config/locales/sv.yml
652
662
  - config/locales/sw-KE.yml
663
+ - config/locales/th-TH.yml
653
664
  - config/locales/ti-ER.yml
654
665
  - config/locales/tr-TR.yml
655
666
  - config/locales/uk.yml
@@ -679,6 +690,7 @@ files:
679
690
  - lib/decidim/admin/import/readers/xlsx.rb
680
691
  - lib/decidim/admin/import/verifier.rb
681
692
  - lib/decidim/admin/test.rb
693
+ - lib/decidim/admin/test/admin_participatory_space_access_examples.rb
682
694
  - lib/decidim/admin/test/commands/create_attachment_collection_examples.rb
683
695
  - lib/decidim/admin/test/commands/create_category_examples.rb
684
696
  - lib/decidim/admin/test/commands/destroy_category_examples.rb
@@ -696,12 +708,13 @@ files:
696
708
  - lib/decidim/admin/test/manage_component_permissions_examples.rb
697
709
  - lib/decidim/admin/test/manage_moderations_examples.rb
698
710
  - lib/decidim/admin/test/manage_paginated_collection_examples.rb
711
+ - lib/decidim/admin/test/needs_admin_tos_accepted_examples.rb
699
712
  - lib/decidim/admin/version.rb
700
713
  homepage: https://github.com/decidim/decidim
701
714
  licenses:
702
715
  - AGPL-3.0
703
716
  metadata: {}
704
- post_install_message:
717
+ post_install_message:
705
718
  rdoc_options: []
706
719
  require_paths:
707
720
  - lib
@@ -716,8 +729,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
716
729
  - !ruby/object:Gem::Version
717
730
  version: '0'
718
731
  requirements: []
719
- rubygems_version: 3.2.22
720
- signing_key:
732
+ rubygems_version: 3.4.22
733
+ signing_key:
721
734
  specification_version: 4
722
735
  summary: Decidim organization administration
723
736
  test_files: []