decidim-core 0.29.5 → 0.30.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (595) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/activity/show.erb +6 -6
  3. data/app/cells/decidim/address/show.erb +3 -3
  4. data/app/cells/decidim/amendable/amend_button_card/show.erb +6 -4
  5. data/app/cells/decidim/amendable/amend_button_card_cell.rb +8 -0
  6. data/app/cells/decidim/amendable/amendments/show.erb +1 -1
  7. data/app/cells/decidim/amendable/promote_button_card/show.erb +2 -0
  8. data/app/cells/decidim/author/flag.erb +6 -0
  9. data/app/cells/decidim/author/flag_user.erb +14 -0
  10. data/app/cells/decidim/author/show.erb +4 -2
  11. data/app/cells/decidim/author_cell.rb +1 -1
  12. data/app/cells/decidim/card_l/extra_data.erb +1 -0
  13. data/app/cells/decidim/card_metadata_cell.rb +9 -16
  14. data/app/cells/decidim/comments_button_cell.rb +14 -2
  15. data/app/cells/decidim/content_blocks/highlighted_elements_cell.rb +2 -0
  16. data/app/cells/decidim/content_blocks/highlighted_elements_with_cell_for_list_cell.rb +1 -1
  17. data/app/cells/decidim/content_blocks/participatory_space_extra_data/extra_data.erb +2 -2
  18. data/app/cells/decidim/content_blocks/participatory_space_main_data/title.erb +2 -11
  19. data/app/cells/decidim/endorsement_block/show.erb +0 -1
  20. data/app/cells/decidim/endorsement_block_cell.rb +6 -0
  21. data/app/cells/decidim/endorsement_buttons/button_content.erb +1 -1
  22. data/app/cells/decidim/endorsement_buttons/select_identity_button.erb +1 -1
  23. data/app/cells/decidim/endorsement_buttons/show.erb +7 -7
  24. data/app/cells/decidim/endorsement_buttons/verification_modal.erb +4 -2
  25. data/app/cells/decidim/endorsers_list/empty.erb +3 -0
  26. data/app/cells/decidim/endorsers_list/full.erb +17 -5
  27. data/app/cells/decidim/endorsers_list/show.erb +19 -10
  28. data/app/cells/decidim/endorsers_list_cell.rb +19 -6
  29. data/app/cells/decidim/flag_modal/flag_user.erb +34 -0
  30. data/app/cells/decidim/flag_modal/show.erb +52 -0
  31. data/app/cells/decidim/flag_modal_cell.rb +56 -0
  32. data/app/cells/decidim/follow_button/show.erb +1 -2
  33. data/app/cells/decidim/follow_button_cell.rb +5 -0
  34. data/app/cells/decidim/footer_topics/show.erb +2 -2
  35. data/app/cells/decidim/group_admins/show.erb +1 -3
  36. data/app/cells/decidim/group_members/show.erb +2 -6
  37. data/app/cells/decidim/images_panel/show.erb +2 -5
  38. data/app/cells/decidim/map/show.erb +3 -0
  39. data/app/cells/decidim/map/template.erb +14 -0
  40. data/app/cells/decidim/map_cell.rb +39 -0
  41. data/app/cells/decidim/notification_actions/buttons_cell.rb +1 -1
  42. data/app/cells/decidim/onboarding_action_message/show.erb +15 -0
  43. data/app/cells/decidim/onboarding_action_message_cell.rb +81 -0
  44. data/app/cells/decidim/participatory_space_dropdown_metadata/metadata.erb +4 -4
  45. data/app/cells/decidim/participatory_space_dropdown_metadata/show.erb +3 -5
  46. data/app/cells/decidim/participatory_space_private_user/show.erb +23 -0
  47. data/app/cells/decidim/participatory_space_private_user_cell.rb +21 -0
  48. data/app/cells/decidim/profile_actions/show.erb +1 -1
  49. data/app/cells/decidim/profile_sidebar/show.erb +167 -0
  50. data/app/cells/decidim/profile_sidebar_cell.rb +68 -0
  51. data/app/cells/decidim/progress_bar/show.erb +2 -2
  52. data/app/cells/decidim/report_button/already_reported_modal.erb +2 -2
  53. data/app/cells/decidim/report_button/flag_modal.erb +36 -24
  54. data/app/cells/decidim/report_button_cell.rb +9 -2
  55. data/app/cells/decidim/resource_history/show.erb +20 -0
  56. data/app/cells/decidim/resource_history_cell.rb +66 -0
  57. data/app/cells/decidim/resource_types_filter/show.erb +1 -1
  58. data/app/cells/decidim/resource_types_filter_cell.rb +6 -6
  59. data/app/cells/decidim/share_button_cell.rb +0 -4
  60. data/app/cells/decidim/share_widget/modal.erb +26 -0
  61. data/app/cells/decidim/share_widget/show.erb +2 -0
  62. data/app/cells/decidim/share_widget_cell.rb +20 -0
  63. data/app/cells/decidim/tags/show.erb +7 -4
  64. data/app/cells/decidim/tags_cell.rb +11 -72
  65. data/app/cells/decidim/upload_modal/files.erb +4 -4
  66. data/app/cells/decidim/upload_modal_cell.rb +3 -5
  67. data/app/cells/decidim/user_activity/show.erb +1 -1
  68. data/app/commands/decidim/amendable/accept.rb +1 -2
  69. data/app/commands/decidim/amendable/create_draft.rb +2 -2
  70. data/app/commands/decidim/create_ephemeral_user.rb +52 -0
  71. data/app/commands/decidim/create_omniauth_registration.rb +21 -17
  72. data/app/commands/decidim/create_report.rb +8 -11
  73. data/app/commands/decidim/create_user_group.rb +6 -2
  74. data/app/commands/decidim/destroy_ephemeral_user.rb +47 -0
  75. data/app/commands/decidim/invite_user.rb +1 -1
  76. data/app/commands/decidim/search.rb +0 -14
  77. data/app/commands/decidim/update_account.rb +11 -3
  78. data/app/commands/decidim/update_notifications_settings.rb +1 -0
  79. data/app/commands/decidim/update_resources_taxonomies.rb +67 -0
  80. data/app/commands/decidim/update_user_group.rb +7 -1
  81. data/app/constraints/decidim/current_component.rb +1 -1
  82. data/app/controllers/concerns/decidim/ajax_permission_handler.rb +21 -0
  83. data/app/controllers/concerns/decidim/devise_authentication_methods.rb +3 -6
  84. data/app/controllers/concerns/decidim/devise_controllers.rb +2 -0
  85. data/app/controllers/concerns/decidim/disable_redirection_to_external_host.rb +1 -1
  86. data/app/controllers/concerns/decidim/ephemeral_session_checker.rb +87 -0
  87. data/app/controllers/concerns/decidim/filter_resource.rb +4 -2
  88. data/app/controllers/concerns/decidim/has_members_page.rb +25 -0
  89. data/app/controllers/concerns/decidim/locale_switcher.rb +2 -2
  90. data/app/controllers/concerns/decidim/needs_password_change.rb +0 -1
  91. data/app/controllers/concerns/decidim/needs_permission.rb +2 -1
  92. data/app/controllers/concerns/decidim/needs_tos_accepted.rb +4 -5
  93. data/app/controllers/concerns/decidim/onboarding_action_methods.rb +52 -0
  94. data/app/controllers/concerns/decidim/participatory_space_context.rb +1 -4
  95. data/app/controllers/decidim/amendments_controller.rb +3 -3
  96. data/app/controllers/decidim/application_controller.rb +9 -0
  97. data/app/controllers/decidim/authorization_modals_controller.rb +8 -2
  98. data/app/controllers/decidim/components/base_controller.rb +3 -7
  99. data/app/controllers/decidim/devise/confirmations_controller.rb +4 -0
  100. data/app/controllers/decidim/devise/omniauth_registrations_controller.rb +8 -1
  101. data/app/controllers/decidim/devise/registrations_controller.rb +1 -1
  102. data/app/controllers/decidim/devise/sessions_controller.rb +2 -0
  103. data/app/controllers/decidim/download_your_data_controller.rb +33 -2
  104. data/app/controllers/decidim/editor_images_controller.rb +1 -11
  105. data/app/controllers/decidim/follows_controller.rb +1 -1
  106. data/app/controllers/decidim/geolocation_controller.rb +19 -0
  107. data/app/controllers/decidim/homepage_controller.rb +0 -1
  108. data/app/controllers/decidim/open_data_controller.rb +33 -8
  109. data/app/controllers/decidim/profiles_controller.rb +2 -2
  110. data/app/controllers/decidim/reports_controller.rb +2 -7
  111. data/app/controllers/decidim/user_activities_controller.rb +1 -1
  112. data/app/controllers/decidim/user_conversations_controller.rb +1 -11
  113. data/app/events/decidim/soft_delete_resource_event.rb +15 -0
  114. data/app/forms/decidim/account_form.rb +2 -5
  115. data/app/forms/decidim/amendable/form.rb +4 -2
  116. data/app/forms/decidim/ephemeral_user_form.rb +22 -0
  117. data/app/forms/decidim/notifications_settings_form.rb +1 -0
  118. data/app/forms/decidim/omniauth_registration_form.rb +15 -2
  119. data/app/forms/decidim/registration_form.rb +1 -1
  120. data/app/helpers/concerns/decidim/flash_helper_extensions.rb +17 -2
  121. data/app/helpers/decidim/action_authorization_helper.rb +75 -14
  122. data/app/helpers/decidim/amendments_helper.rb +1 -11
  123. data/app/helpers/decidim/application_helper.rb +6 -2
  124. data/app/helpers/decidim/breadcrumb_helper.rb +6 -0
  125. data/app/helpers/decidim/cache_helper.rb +1 -1
  126. data/app/helpers/decidim/check_boxes_tree_helper.rb +25 -53
  127. data/app/helpers/decidim/decidim_form_helper.rb +0 -44
  128. data/app/helpers/decidim/endorsable_helper.rb +0 -10
  129. data/app/helpers/decidim/filters_helper.rb +0 -25
  130. data/app/helpers/decidim/layout_helper.rb +6 -6
  131. data/app/helpers/decidim/menu_helper.rb +2 -2
  132. data/app/helpers/decidim/messaging/conversation_helper.rb +2 -3
  133. data/app/helpers/decidim/meta_tags_helper.rb +32 -23
  134. data/app/helpers/decidim/modal_helper.rb +23 -0
  135. data/app/helpers/decidim/omniauth_helper.rb +5 -5
  136. data/app/helpers/decidim/onboarding_action_helper.rb +13 -0
  137. data/app/helpers/decidim/orders_helper.rb +1 -2
  138. data/app/helpers/decidim/paginate_helper.rb +1 -1
  139. data/app/helpers/decidim/participatory_space_helpers.rb +1 -1
  140. data/app/helpers/decidim/passwords_helper.rb +2 -2
  141. data/app/helpers/decidim/taxonomies_helper.rb +40 -0
  142. data/app/helpers/decidim/tooltip_helper.rb +1 -4
  143. data/app/jobs/decidim/download_your_data_export_job.rb +2 -19
  144. data/app/jobs/decidim/event_publisher_job.rb +18 -9
  145. data/app/jobs/decidim/export_job.rb +5 -1
  146. data/app/jobs/decidim/export_participatory_space_job.rb +4 -1
  147. data/app/jobs/decidim/open_data_job.rb +4 -4
  148. data/app/mailers/decidim/export_mailer.rb +7 -12
  149. data/app/mailers/decidim/notifications_digest_mailer.rb +1 -7
  150. data/app/mailers/decidim/reported_mailer.rb +2 -18
  151. data/app/models/decidim/action_log.rb +20 -1
  152. data/app/models/decidim/category.rb +4 -0
  153. data/app/models/decidim/component.rb +25 -3
  154. data/app/models/decidim/metric.rb +2 -1
  155. data/app/models/decidim/moderation.rb +16 -0
  156. data/app/models/decidim/newsletter.rb +12 -8
  157. data/app/models/decidim/organization.rb +7 -3
  158. data/app/models/decidim/participatory_space_private_user.rb +20 -0
  159. data/app/models/decidim/private_export.rb +24 -0
  160. data/app/models/decidim/push_notification_message.rb +1 -1
  161. data/app/models/decidim/report.rb +1 -1
  162. data/app/models/decidim/scope.rb +4 -0
  163. data/app/models/decidim/share_token.rb +36 -10
  164. data/app/models/decidim/taxonomization.rb +23 -0
  165. data/app/models/decidim/taxonomy.rb +139 -0
  166. data/app/models/decidim/taxonomy_filter.rb +130 -0
  167. data/app/models/decidim/taxonomy_filter_item.rb +33 -0
  168. data/app/models/decidim/user.rb +13 -23
  169. data/app/models/decidim/user_base_entity.rb +12 -4
  170. data/app/models/decidim/user_moderation.rb +9 -0
  171. data/app/models/decidim/user_report.rb +4 -0
  172. data/app/packs/entrypoints/decidim_core.js +1 -0
  173. data/app/packs/entrypoints/decidim_geocoding.js +2 -0
  174. data/app/packs/images/decidim/brands/facebook.svg +10 -0
  175. data/app/packs/images/decidim/brands/google.svg +7 -1
  176. data/app/packs/images/decidim/brands/twitter-x.svg +3 -0
  177. data/app/packs/images/decidim/default-avatar.svg +1 -1
  178. data/app/packs/src/decidim/callout.js +8 -13
  179. data/app/packs/src/decidim/check_boxes_tree.js +0 -1
  180. data/app/packs/src/decidim/clipboard.js +18 -9
  181. data/app/packs/src/decidim/datepicker/datepicker_functions.js +3 -3
  182. data/app/packs/src/decidim/datepicker/generate_datepicker.js +0 -2
  183. data/app/packs/src/decidim/datepicker/generate_timepicker.js +0 -2
  184. data/app/packs/src/decidim/decidim_application.js +1 -0
  185. data/app/packs/src/decidim/direct_uploads/upload_field.js +4 -3
  186. data/app/packs/src/decidim/direct_uploads/upload_modal.js +9 -8
  187. data/app/packs/src/decidim/editor/common/suggestion.js +1 -11
  188. data/app/packs/src/decidim/geocoding/reverse_geocoding.js +60 -0
  189. data/app/packs/src/decidim/index.js +9 -5
  190. data/app/packs/src/decidim/input_character_counter.js +1 -1
  191. data/app/packs/src/decidim/map/provider/here.js +1 -1
  192. data/app/packs/src/decidim/onboarding_pending_action.js +24 -0
  193. data/app/packs/src/decidim/sticky_footer.js +29 -0
  194. data/app/packs/src/decidim/sticky_header.js +6 -31
  195. data/app/packs/src/decidim/user_registrations.js +13 -0
  196. data/app/packs/src/decidim/vendor/leaflet-tilelayer-here.js +212 -0
  197. data/app/packs/stylesheets/decidim/_accordion.scss +30 -0
  198. data/app/packs/stylesheets/decidim/_activity.scss +4 -4
  199. data/app/packs/stylesheets/decidim/_buttons.scss +19 -0
  200. data/app/packs/stylesheets/decidim/_cards.scss +0 -4
  201. data/app/packs/stylesheets/decidim/_content_blocks.scss +0 -4
  202. data/app/packs/stylesheets/decidim/_dropdown.scss +1 -1
  203. data/app/packs/stylesheets/decidim/_endorsers_list.scss +26 -20
  204. data/app/packs/stylesheets/decidim/_filters.scss +1 -1
  205. data/app/packs/stylesheets/decidim/_forms.scss +2 -2
  206. data/app/packs/stylesheets/decidim/_header.scss +39 -70
  207. data/app/packs/stylesheets/decidim/_layout.scss +34 -4
  208. data/app/packs/stylesheets/decidim/_login.scss +53 -6
  209. data/app/packs/stylesheets/decidim/_modal.scss +47 -1
  210. data/app/packs/stylesheets/decidim/_modal_tos_refuse.scss +4 -0
  211. data/app/packs/stylesheets/decidim/_modal_update.scss +1 -5
  212. data/app/packs/stylesheets/decidim/_participatory_spaces.scss +46 -0
  213. data/app/packs/stylesheets/decidim/_profile.scss +1 -1
  214. data/app/packs/stylesheets/decidim/_success_image.scss +64 -0
  215. data/app/packs/stylesheets/decidim/_tribute.scss +36 -0
  216. data/app/packs/stylesheets/decidim/application.scss +1 -1
  217. data/app/packs/stylesheets/decidim/geocoding_addons.scss +5 -0
  218. data/app/packs/stylesheets/decidim/map.scss +7 -10
  219. data/app/packs/stylesheets/decidim/resource_history.scss +31 -0
  220. data/app/permissions/decidim/default_permissions.rb +0 -2
  221. data/app/permissions/decidim/permissions.rb +9 -15
  222. data/app/presenters/decidim/admin_log/base_user_presenter.rb +67 -0
  223. data/app/presenters/decidim/admin_log/component_presenter.rb +32 -3
  224. data/app/presenters/decidim/admin_log/moderation_presenter.rb +30 -3
  225. data/app/presenters/decidim/admin_log/share_token_presenter.rb +39 -0
  226. data/app/presenters/decidim/admin_log/taxonomy_filter_presenter.rb +57 -0
  227. data/app/presenters/decidim/admin_log/taxonomy_presenter.rb +48 -0
  228. data/app/presenters/decidim/admin_log/user_group_presenter.rb +6 -6
  229. data/app/presenters/decidim/admin_log/user_presenter.rb +4 -18
  230. data/app/presenters/decidim/log/user_presenter.rb +0 -1
  231. data/app/presenters/decidim/log/value_types/date_presenter.rb +1 -0
  232. data/app/presenters/decidim/log/value_types/taxonomy_presenter.rb +29 -0
  233. data/app/presenters/decidim/notification_to_mailer_presenter.rb +3 -7
  234. data/app/presenters/decidim/participatory_space_private_user_presenter.rb +50 -0
  235. data/app/presenters/decidim/taxonomy_filter_presenter.rb +19 -0
  236. data/app/presenters/decidim/taxonomy_presenter.rb +14 -0
  237. data/app/presenters/decidim/user_presenter.rb +1 -1
  238. data/app/queries/decidim/last_activity.rb +0 -25
  239. data/app/queries/decidim/metrics/blocked_users_metric_manage.rb +2 -2
  240. data/app/queries/decidim/metrics/users_metric_manage.rb +2 -2
  241. data/app/queries/decidim/public_activities.rb +1 -12
  242. data/app/queries/decidim/stats_users_count.rb +2 -2
  243. data/app/resolvers/decidim/meta_image_url_resolver.rb +128 -0
  244. data/app/serializers/decidim/exporters/open_data_blocked_user_serializer.rb +25 -0
  245. data/app/serializers/decidim/exporters/open_data_metric_serializer.rb +22 -0
  246. data/app/serializers/decidim/exporters/open_data_moderation_serializer.rb +30 -0
  247. data/app/serializers/decidim/exporters/open_data_taxonomy_serializer.rb +30 -0
  248. data/app/serializers/decidim/exporters/open_data_user_group_serializer.rb +38 -0
  249. data/app/serializers/decidim/exporters/open_data_user_serializer.rb +39 -0
  250. data/app/serializers/decidim/exporters/participatory_space_serializer.rb +104 -0
  251. data/app/serializers/decidim/exporters/serializer.rb +25 -0
  252. data/app/serializers/decidim/schema_org_breadcrumb_list_serializer.rb +52 -0
  253. data/app/services/decidim/action_authorizer.rb +32 -3
  254. data/app/services/decidim/base_diff_renderer.rb +1 -3
  255. data/app/services/decidim/download_your_data_exporter.rb +58 -24
  256. data/app/services/decidim/onboarding_manager.rb +272 -0
  257. data/app/services/decidim/open_data_exporter.rb +139 -13
  258. data/app/services/decidim/static_map_generator.rb +1 -1
  259. data/app/services/decidim/traceability.rb +13 -0
  260. data/app/uploaders/decidim/application_uploader.rb +1 -1
  261. data/app/validators/etiquette_validator.rb +9 -2
  262. data/app/validators/passthru_validator.rb +1 -1
  263. data/app/validators/translated_etiquette_validator.rb +32 -0
  264. data/app/views/decidim/account/_password_fields.html.erb +2 -2
  265. data/app/views/decidim/application/_accordion_section.html.erb +14 -0
  266. data/app/views/decidim/application/_collection.html.erb +30 -18
  267. data/app/views/decidim/devise/omniauth_registrations/new.html.erb +5 -1
  268. data/app/views/decidim/devise/omniauth_registrations/new_tos_fields.html.erb +29 -0
  269. data/app/views/decidim/devise/registrations/new.html.erb +10 -22
  270. data/app/views/decidim/devise/sessions/new.html.erb +24 -29
  271. data/app/views/decidim/devise/shared/_omniauth_buttons.html.erb +2 -4
  272. data/app/views/decidim/devise/shared/_tos_fields.html.erb +16 -0
  273. data/app/views/decidim/download_your_data/_export.html.erb +15 -0
  274. data/app/views/decidim/download_your_data/show.html.erb +51 -5
  275. data/app/views/decidim/endorsements/update_buttons_and_counters.js.erb +16 -19
  276. data/app/views/decidim/errors/internal_server_error.html.erb +1 -1
  277. data/app/views/decidim/errors/not_found.html.erb +1 -1
  278. data/app/views/decidim/export_mailer/download_your_data_export.html.erb +2 -2
  279. data/app/views/decidim/export_mailer/export.html.erb +5 -1
  280. data/app/views/decidim/last_activities/index.html.erb +1 -1
  281. data/app/views/decidim/messaging/conversations/_reply_form.html.erb +2 -1
  282. data/app/views/decidim/messaging/conversations/_start.html.erb +1 -1
  283. data/app/views/decidim/newsletters/unsubscribe.html.erb +4 -16
  284. data/app/views/decidim/notifications_settings/show.html.erb +22 -0
  285. data/app/views/decidim/open_data/_how_to_open_accordion_section.html.erb +15 -0
  286. data/app/views/decidim/open_data/index.html.erb +108 -0
  287. data/app/views/decidim/pages/show.html.erb +2 -1
  288. data/app/views/decidim/participatory_space_private_users/_participatory_space_private_user.html.erb +1 -0
  289. data/app/views/decidim/reported_mailer/hide.html.erb +9 -0
  290. data/app/views/decidim/reported_mailer/report.html.erb +1 -1
  291. data/app/views/decidim/searches/_count.html.erb +1 -1
  292. data/app/views/decidim/searches/_filters.html.erb +39 -76
  293. data/app/views/decidim/shared/_component_announcement.html.erb +1 -1
  294. data/app/views/decidim/shared/_confirm_modal.html.erb +5 -3
  295. data/app/views/decidim/shared/_filters.html.erb +4 -6
  296. data/app/views/decidim/shared/_login_modal.html.erb +26 -20
  297. data/app/views/decidim/shared/_orders.html.erb +2 -2
  298. data/app/views/decidim/shared/_resource_actions.html.erb +21 -0
  299. data/app/views/decidim/shared/_results_per_page.html.erb +1 -1
  300. data/app/views/decidim/shared/filters/_check_boxes_tree.html.erb +1 -2
  301. data/app/views/decidim/shared/filters/_collection.html.erb +1 -1
  302. data/app/views/decidim/shared/filters/_dropdown_label.html.erb +7 -4
  303. data/app/views/kaminari/decidim/_page.html.erb +1 -1
  304. data/app/views/kaminari/decidim/_paginator.html.erb +1 -1
  305. data/app/views/layouts/decidim/_application.html.erb +0 -1
  306. data/app/views/layouts/decidim/_logo.html.erb +2 -2
  307. data/app/views/layouts/decidim/_logo_mobile.html.erb +1 -1
  308. data/app/views/layouts/decidim/_meta_tags_config.html.erb +6 -11
  309. data/app/views/layouts/decidim/_schema_org_breadcrumb_list.html.erb +3 -0
  310. data/app/views/layouts/decidim/_wrapper.html.erb +15 -9
  311. data/app/views/layouts/decidim/footer/_main.html.erb +1 -1
  312. data/app/views/layouts/decidim/footer/_main_intro.html.erb +1 -1
  313. data/app/views/layouts/decidim/footer/_main_legal.html.erb +1 -1
  314. data/app/views/layouts/decidim/footer/_main_links.html.erb +1 -1
  315. data/app/views/layouts/decidim/footer/_mini.html.erb +2 -2
  316. data/app/views/layouts/decidim/header/_close_ephemeral_session.html.erb +25 -0
  317. data/app/views/layouts/decidim/header/_main.html.erb +14 -10
  318. data/app/views/layouts/decidim/header/_main_links_desktop.html.erb +0 -6
  319. data/app/views/layouts/decidim/header/_main_links_dropdown.html.erb +0 -2
  320. data/app/views/layouts/decidim/header/_main_links_mobile_account.html.erb +1 -1
  321. data/app/views/layouts/decidim/header/_menu_breadcrumb_items.html.erb +2 -0
  322. data/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown_desktop.html.erb +11 -5
  323. data/app/views/layouts/decidim/header/_menu_breadcrumb_mobile_tablet.html.erb +5 -5
  324. data/app/views/layouts/decidim/header/_mobile_language_choose.html.erb +1 -1
  325. data/app/views/layouts/decidim/shared/_layout_item.html.erb +1 -1
  326. data/config/assets.rb +2 -1
  327. data/config/locales/ar.yml +38 -74
  328. data/config/locales/bg-BG.yml +2 -2
  329. data/config/locales/bg.yml +38 -74
  330. data/config/locales/bs-BA.yml +0 -2
  331. data/config/locales/ca.yml +374 -130
  332. data/config/locales/cs.yml +379 -116
  333. data/config/locales/de.yml +370 -132
  334. data/config/locales/el.yml +26 -58
  335. data/config/locales/en.yml +354 -110
  336. data/config/locales/eo.yml +0 -4
  337. data/config/locales/es-MX.yml +368 -127
  338. data/config/locales/es-PY.yml +373 -132
  339. data/config/locales/es.yml +374 -130
  340. data/config/locales/eu.yml +461 -215
  341. data/config/locales/fi-plain.yml +367 -130
  342. data/config/locales/fi.yml +372 -132
  343. data/config/locales/fr-CA.yml +180 -125
  344. data/config/locales/fr-LU.yml +3 -3
  345. data/config/locales/fr.yml +180 -122
  346. data/config/locales/ga-IE.yml +4 -25
  347. data/config/locales/gl.yml +23 -58
  348. data/config/locales/hu.yml +35 -62
  349. data/config/locales/id-ID.yml +24 -57
  350. data/config/locales/is-IS.yml +6 -25
  351. data/config/locales/it.yml +39 -218
  352. data/config/locales/ja.yml +235 -140
  353. data/config/locales/lb-LU.yml +2 -2
  354. data/config/locales/lb.yml +31 -76
  355. data/config/locales/lt.yml +29 -64
  356. data/config/locales/lv.yml +24 -58
  357. data/config/locales/nl.yml +26 -75
  358. data/config/locales/no.yml +26 -70
  359. data/config/locales/pl.yml +35 -72
  360. data/config/locales/pt-BR.yml +44 -63
  361. data/config/locales/pt.yml +26 -70
  362. data/config/locales/ro-RO.yml +118 -183
  363. data/config/locales/ru.yml +16 -43
  364. data/config/locales/sk-SK.yml +3 -3
  365. data/config/locales/sk.yml +27 -72
  366. data/config/locales/sl.yml +0 -4
  367. data/config/locales/sr-CS.yml +0 -2
  368. data/config/locales/sv.yml +141 -133
  369. data/config/locales/tr-TR.yml +32 -75
  370. data/config/locales/uk.yml +8 -29
  371. data/config/locales/zh-CN.yml +24 -68
  372. data/config/locales/zh-TW.yml +28 -62
  373. data/config/routes.rb +4 -10
  374. data/db/migrate/20171212103803_create_unique_nicknames.rb +1 -1
  375. data/db/migrate/20180221101934_fix_nickname_index.rb +1 -1
  376. data/db/migrate/20180706104107_add_nickname_to_managed_users.rb +1 -1
  377. data/db/migrate/20181001124950_move_users_groups_to_users_table.rb +1 -1
  378. data/db/migrate/20181025082245_add_timestamps_to_components.rb +2 -0
  379. data/db/migrate/20190412131728_fix_user_names.rb +1 -1
  380. data/db/migrate/20240628111905_add_visible_to_components.rb +7 -0
  381. data/db/migrate/20240704115429_create_decidim_taxonomies.rb +23 -0
  382. data/db/migrate/20240717093514_add_registered_only_to_decidim_share_tokens.rb +7 -0
  383. data/db/migrate/20240722215500_change_object_changes_on_versions.rb +39 -0
  384. data/db/migrate/20240806065417_create_decidim_taxonomy_filters.rb +23 -0
  385. data/db/migrate/20240822161348_add_deleted_at_to_decidim_components.rb +8 -0
  386. data/db/migrate/20240906162524_add_part_of_to_taxonomies.rb +26 -0
  387. data/db/migrate/20241001135825_add_role_to_participatory_space_private_users.rb +7 -0
  388. data/db/migrate/20241001140408_add_published_to_participatory_space_private_users.rb +7 -0
  389. data/db/migrate/20241022002600_create_private_exports.rb +18 -0
  390. data/db/migrate/20241028114430_add_component_counter_to_taxonomy_filters.rb +7 -0
  391. data/db/migrate/20241111104357_add_names_and_space_boolean_to_taxonomy_filters.rb +9 -0
  392. data/db/migrate/20241127093708_add_taxonomy_to_metrics.rb +7 -0
  393. data/db/migrate/20241204121445_add_participatory_space_manifests_from_taxonomy_filters.rb +9 -0
  394. data/decidim-core.gemspec +14 -17
  395. data/lib/decidim/action_authorization.rb +3 -2
  396. data/lib/decidim/amendable.rb +1 -1
  397. data/lib/decidim/api/input_filters/category_input_filter.rb +5 -3
  398. data/lib/decidim/api/input_filters/component_input_filter.rb +33 -20
  399. data/lib/decidim/api/input_filters/user_entity_input_filter.rb +53 -44
  400. data/lib/decidim/api/input_sorts/component_input_sort.rb +15 -13
  401. data/lib/decidim/api/input_sorts/user_entity_input_sort.rb +4 -4
  402. data/lib/decidim/api/interfaces/author_interface.rb +3 -2
  403. data/lib/decidim/api/interfaces/coauthorable_interface.rb +5 -5
  404. data/lib/decidim/api/interfaces/endorsable_interface.rb +2 -2
  405. data/lib/decidim/api/interfaces/participatory_space_interface.rb +5 -10
  406. data/lib/decidim/api/interfaces/taxonomizable_interface.rb +13 -0
  407. data/lib/decidim/api/types/amendment_type.rb +5 -7
  408. data/lib/decidim/api/types/area_api_type.rb +3 -3
  409. data/lib/decidim/api/types/attachment_type.rb +3 -3
  410. data/lib/decidim/api/types/category_type.rb +2 -2
  411. data/lib/decidim/api/types/decidim_type.rb +5 -1
  412. data/lib/decidim/api/types/fingerprint_type.rb +1 -1
  413. data/lib/decidim/api/types/localized_string_type.rb +1 -1
  414. data/lib/decidim/api/types/metric_history_type.rb +2 -0
  415. data/lib/decidim/api/types/metric_type.rb +1 -1
  416. data/lib/decidim/api/types/organization_type.rb +5 -0
  417. data/lib/decidim/api/types/participatory_space_link_type.rb +2 -2
  418. data/lib/decidim/api/types/participatory_space_manifest_type.rb +1 -1
  419. data/lib/decidim/api/types/quantifiable_translated_field_type.rb +1 -1
  420. data/lib/decidim/api/types/scope_api_type.rb +2 -3
  421. data/lib/decidim/api/types/session_type.rb +1 -2
  422. data/lib/decidim/api/types/taxonomy_type.rb +15 -0
  423. data/lib/decidim/api/types/trace_version_type.rb +2 -2
  424. data/lib/decidim/api/types/translated_field_type.rb +3 -5
  425. data/lib/decidim/api/types/user_group_type.rb +7 -20
  426. data/lib/decidim/api/types/user_type.rb +7 -20
  427. data/lib/decidim/asset_router/storage.rb +6 -11
  428. data/lib/decidim/assets/tailwind/tailwind.config.js.erb +3 -3
  429. data/lib/decidim/attachment_attributes.rb +1 -1
  430. data/lib/decidim/attribute_encryptor.rb +1 -1
  431. data/lib/decidim/attribute_object/nested_validator.rb +1 -1
  432. data/lib/decidim/attributes/integer_with_units.rb +27 -0
  433. data/lib/decidim/attributes/time_with_zone.rb +1 -5
  434. data/lib/decidim/attributes.rb +2 -0
  435. data/lib/decidim/authorization_form_builder.rb +0 -7
  436. data/lib/decidim/coauthorable.rb +1 -1
  437. data/lib/decidim/command.rb +3 -3
  438. data/lib/decidim/commands/destroy_resource.rb +5 -1
  439. data/lib/decidim/commands/resource_handler.rb +2 -2
  440. data/lib/decidim/commands/restore_resource.rb +45 -0
  441. data/lib/decidim/commands/soft_delete_resource.rb +63 -0
  442. data/lib/decidim/component_manifest.rb +7 -0
  443. data/lib/decidim/content_parsers/blob_parser.rb +8 -10
  444. data/lib/decidim/content_parsers/user_parser.rb +1 -1
  445. data/lib/decidim/core/api.rb +2 -0
  446. data/lib/decidim/core/engine.rb +21 -7
  447. data/lib/decidim/core/menu.rb +0 -5
  448. data/lib/decidim/core/seeds.rb +42 -2
  449. data/lib/decidim/core/test/factories.rb +107 -4
  450. data/lib/decidim/core/test/shared_examples/admin_resource_gallery_examples.rb +85 -0
  451. data/lib/decidim/core/test/shared_examples/announcements_examples.rb +0 -4
  452. data/lib/decidim/core/test/shared_examples/comments_examples.rb +393 -38
  453. data/lib/decidim/core/test/shared_examples/components_controller_hide_shared_examples.rb +11 -0
  454. data/lib/decidim/core/test/shared_examples/components_controller_reorder_shared_examples.rb +21 -0
  455. data/lib/decidim/core/test/shared_examples/download_open_data_shared_context.rb +36 -0
  456. data/lib/decidim/core/test/shared_examples/download_open_data_shared_examples.rb +45 -0
  457. data/lib/decidim/core/test/shared_examples/download_your_data_shared_examples.rb +17 -0
  458. data/lib/decidim/core/test/shared_examples/etiquette_validator_examples.rb +25 -0
  459. data/lib/decidim/core/test/shared_examples/follows_examples.rb +43 -0
  460. data/lib/decidim/core/test/shared_examples/has_taxonomies.rb +94 -0
  461. data/lib/decidim/core/test/shared_examples/manage_share_tokens_examples.rb +237 -0
  462. data/lib/decidim/core/test/shared_examples/map_examples.rb +2 -0
  463. data/lib/decidim/core/test/shared_examples/open_data_exporter_examples.rb +102 -0
  464. data/lib/decidim/core/test/shared_examples/participatory_space_members_page_examples.rb +46 -0
  465. data/lib/decidim/core/test/shared_examples/participatory_space_search_examples.rb +98 -0
  466. data/lib/decidim/core/test/shared_examples/permissions.rb +7 -7
  467. data/lib/decidim/core/test/shared_examples/preview_with_share_token_examples.rb +94 -0
  468. data/lib/decidim/core/test/shared_examples/reports_examples.rb +15 -53
  469. data/lib/decidim/core/test/shared_examples/resource_endorsed_event_examples.rb +2 -2
  470. data/lib/decidim/core/test/shared_examples/resource_search_examples.rb +75 -69
  471. data/lib/decidim/core/test/shared_examples/searchable_resources_shared_context.rb +1 -1
  472. data/lib/decidim/core/test/shared_examples/simple_event.rb +33 -19
  473. data/lib/decidim/core/test/shared_examples/social_share_examples.rb +7 -14
  474. data/lib/decidim/core/test/shared_examples/softdeleteable_components_examples.rb +173 -0
  475. data/lib/decidim/core/test/shared_examples/system_endorse_resource_examples.rb +54 -8
  476. data/lib/decidim/core/test/shared_examples/taxonomizable_interface_examples.rb +20 -0
  477. data/lib/decidim/core/test/shared_examples/taxonomizable_resource_examples.rb +37 -0
  478. data/lib/decidim/core/test/shared_examples/taxonomy_settings.rb +49 -0
  479. data/lib/decidim/core/test/shared_examples/translated_event_examples.rb +1 -1
  480. data/lib/decidim/core/test/shared_examples/uncommentable_component_examples.rb +0 -26
  481. data/lib/decidim/core/test/shared_examples/versions_controller_examples.rb +2 -28
  482. data/lib/decidim/core/test/shared_examples/with_endorsable_permissions_examples.rb +1 -1
  483. data/lib/decidim/core/test.rb +9 -5
  484. data/lib/decidim/core/version.rb +1 -1
  485. data/lib/decidim/core.rb +58 -0
  486. data/lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb +0 -4
  487. data/lib/decidim/download_your_data_serializers/download_your_data_participatory_space_private_user_serializer.rb +3 -1
  488. data/lib/decidim/download_your_data_serializers/download_your_data_report_serializer.rb +2 -1
  489. data/lib/decidim/download_your_data_serializers/download_your_data_user_serializer.rb +6 -7
  490. data/lib/decidim/download_your_data_serializers.rb +19 -0
  491. data/lib/decidim/exporters/csv.rb +6 -0
  492. data/lib/decidim/exporters/export_manifest.rb +14 -0
  493. data/lib/decidim/exporters/pdf.rb +26 -22
  494. data/lib/decidim/filter_form_builder.rb +12 -15
  495. data/lib/decidim/form_builder.rb +6 -143
  496. data/lib/decidim/has_category.rb +5 -1
  497. data/lib/decidim/has_private_users.rb +4 -0
  498. data/lib/decidim/has_taxonomy_settings.rb +47 -0
  499. data/lib/decidim/has_upload_validations.rb +1 -1
  500. data/lib/decidim/legacy_form_builder.rb +118 -0
  501. data/lib/decidim/maintenance/import_models/application_record.rb +93 -0
  502. data/lib/decidim/maintenance/import_models/area.rb +82 -0
  503. data/lib/decidim/maintenance/import_models/area_type.rb +12 -0
  504. data/lib/decidim/maintenance/import_models/assembly_type.rb +49 -0
  505. data/lib/decidim/maintenance/import_models/categorization.rb +14 -0
  506. data/lib/decidim/maintenance/import_models/category.rb +107 -0
  507. data/lib/decidim/maintenance/import_models/participatory_process_type.rb +21 -0
  508. data/lib/decidim/maintenance/import_models/scope.rb +163 -0
  509. data/lib/decidim/maintenance/import_models.rb +19 -0
  510. data/lib/decidim/maintenance/taxonomy_importer.rb +132 -0
  511. data/lib/decidim/maintenance/taxonomy_plan.rb +78 -0
  512. data/lib/decidim/maintenance.rb +12 -0
  513. data/lib/decidim/map/autocomplete.rb +52 -8
  514. data/lib/decidim/map/dynamic_map.rb +1 -1
  515. data/lib/decidim/map/provider/dynamic_map/here.rb +40 -1
  516. data/lib/decidim/map/provider/geocoding/here.rb +9 -3
  517. data/lib/decidim/map/provider/static_map/here.rb +0 -34
  518. data/lib/decidim/map.rb +3 -6
  519. data/lib/decidim/moderation_tools.rb +16 -19
  520. data/lib/decidim/newsletter_encryptor.rb +1 -1
  521. data/lib/decidim/nicknamizable.rb +9 -6
  522. data/lib/decidim/paddable.rb +1 -1
  523. data/lib/decidim/participable.rb +10 -10
  524. data/lib/decidim/participatory_space_user.rb +10 -0
  525. data/lib/decidim/private_download_helper.rb +15 -0
  526. data/lib/decidim/record_encryptor.rb +51 -46
  527. data/lib/decidim/reportable.rb +2 -6
  528. data/lib/decidim/resourceable.rb +16 -0
  529. data/lib/decidim/seeds.rb +18 -20
  530. data/lib/decidim/settings_manifest.rb +34 -1
  531. data/lib/decidim/soft_deletable.rb +17 -0
  532. data/lib/decidim/taxonomizable.rb +72 -0
  533. data/lib/decidim/translatable_attributes.rb +1 -5
  534. data/lib/decidim/view_model.rb +0 -1
  535. data/lib/tasks/decidim_download_your_data_tasks.rake +2 -4
  536. data/lib/tasks/decidim_procfile.rake +6 -0
  537. data/lib/tasks/decidim_tasks.rake +1 -0
  538. data/lib/tasks/decidim_taxonomies.rake +155 -0
  539. data/lib/tasks/upgrade/{decidim_fix_categorization.rake → clean.rake} +25 -18
  540. data/lib/tasks/upgrade/decidim_active_storage_migration_tasks.rake +1 -1
  541. data/lib/tasks/upgrade/decidim_fix_nickname_uniqueness.rake +20 -23
  542. data/lib/tasks/upgrade/migrations.rake +91 -0
  543. metadata +201 -113
  544. data/app/cells/decidim/amendable/amenders_list/show.erb +0 -0
  545. data/app/cells/decidim/content_blocks/base/content.erb +0 -0
  546. data/app/cells/decidim/endorsers_list/full_endorsers_list.erb +0 -3
  547. data/app/cells/decidim/endorsers_list_button/content.erb +0 -1
  548. data/app/cells/decidim/endorsers_list_button_cell.rb +0 -15
  549. data/app/cells/decidim/report_user_button/already_reported_modal.erb +0 -11
  550. data/app/cells/decidim/report_user_button/flag_modal.erb +0 -47
  551. data/app/cells/decidim/report_user_button/show.erb +0 -2
  552. data/app/cells/decidim/report_user_button_cell.rb +0 -59
  553. data/app/cells/decidim/scopes_picker/scope_picker_prompt.erb +0 -3
  554. data/app/cells/decidim/scopes_picker/scope_picker_values.erb +0 -5
  555. data/app/cells/decidim/scopes_picker/show.erb +0 -14
  556. data/app/cells/decidim/scopes_picker_cell.rb +0 -92
  557. data/app/commands/decidim/update_user_interests.rb +0 -41
  558. data/app/controllers/decidim/scopes_controller.rb +0 -84
  559. data/app/controllers/decidim/user_interests_controller.rb +0 -30
  560. data/app/forms/decidim/user_interest_scope_form.rb +0 -25
  561. data/app/forms/decidim/user_interests_form.rb +0 -17
  562. data/app/helpers/decidim/categories_helper.rb +0 -26
  563. data/app/helpers/decidim/scopes_helper.rb +0 -105
  564. data/app/jobs/decidim/hide_child_resources_job.rb +0 -24
  565. data/app/packs/images/decidim/vendor/leaflet/layers-2x.png +0 -0
  566. data/app/packs/images/decidim/vendor/leaflet/layers.png +0 -0
  567. data/app/packs/images/decidim/vendor/leaflet/marker-icon-2x.png +0 -0
  568. data/app/packs/images/decidim/vendor/leaflet/marker-icon.png +0 -0
  569. data/app/packs/images/decidim/vendor/leaflet/marker-shadow.png +0 -0
  570. data/app/packs/src/decidim/dropdown_menu.js +0 -18
  571. data/app/packs/stylesheets/decidim/_hashtags.scss +0 -5
  572. data/app/packs/stylesheets/decidim/legacy/MarkerCluster.Default.scss +0 -67
  573. data/app/packs/stylesheets/decidim/legacy/MarkerCluster.scss +0 -18
  574. data/app/packs/stylesheets/decidim/legacy/leaflet.scss +0 -705
  575. data/app/validators/scope_belongs_to_component_validator.rb +0 -16
  576. data/app/views/decidim/account/_user_groups.html.erb +0 -0
  577. data/app/views/decidim/reported_mailer/hidden_automatically.html.erb +0 -25
  578. data/app/views/decidim/reported_mailer/hidden_manually.html.erb +0 -25
  579. data/app/views/decidim/scopes/_scopes_picker_input.html.erb +0 -19
  580. data/app/views/decidim/scopes/picker.html.erb +0 -53
  581. data/app/views/decidim/shared/_comments.html.erb +0 -0
  582. data/app/views/decidim/shared/_share_modal.html.erb +0 -26
  583. data/app/views/decidim/shared/_tags.html.erb +0 -1
  584. data/app/views/decidim/user_interests/_areas.html.erb +0 -14
  585. data/app/views/decidim/user_interests/_scopes.html.erb +0 -22
  586. data/app/views/decidim/user_interests/show.html.erb +0 -22
  587. data/config/initializers/foundation_rails_helper.rb +0 -4
  588. data/config/locales/ca-IT.yml +0 -2146
  589. data/lib/decidim/core/test/shared_examples/has_category.rb +0 -38
  590. data/lib/decidim/core/test/shared_examples/has_scope.rb +0 -11
  591. data/lib/decidim/core/test/shared_examples/manage_component_share_tokens.rb +0 -83
  592. data/lib/decidim/core/test/shared_examples/preview_component_with_share_token_examples.rb +0 -49
  593. data/lib/decidim/core/test/shared_examples/scope_helper_examples.rb +0 -93
  594. data/lib/decidim/seven_zip_wrapper.rb +0 -29
  595. data/lib/tasks/upgrade/clean_hidden_resources.rake +0 -33
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddVisibleToComponents < ActiveRecord::Migration[7.0]
4
+ def change
5
+ add_column :decidim_components, :visible, :boolean, default: true
6
+ end
7
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ class CreateDecidimTaxonomies < ActiveRecord::Migration[7.0]
4
+ def change
5
+ create_table :decidim_taxonomies do |t|
6
+ t.jsonb :name, null: false, default: {}
7
+ t.references :decidim_organization, null: false, index: true
8
+ t.references :parent, index: true
9
+ t.integer :weight
10
+ t.integer :children_count, null: false, default: 0
11
+ t.integer :taxonomizations_count, null: false, default: 0
12
+ t.timestamps
13
+ end
14
+
15
+ create_table :decidim_taxonomizations do |t|
16
+ t.references :taxonomy, null: false, index: true
17
+ t.references :taxonomizable, null: false, polymorphic: true, index: { name: "index_taxonomizations_on_taxonomizable" }
18
+ t.timestamps
19
+ end
20
+
21
+ add_index :decidim_taxonomizations, [:taxonomy_id, :taxonomizable_id, :taxonomizable_type], name: "index_taxonomizations_on_id_tid_and_ttype", unique: true
22
+ end
23
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddRegisteredOnlyToDecidimShareTokens < ActiveRecord::Migration[7.0]
4
+ def change
5
+ add_column :decidim_share_tokens, :registered_only, :boolean
6
+ end
7
+ end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ class ChangeObjectChangesOnVersions < ActiveRecord::Migration[6.1]
4
+ def up
5
+ rename_column :versions, :object_changes, :old_object_changes
6
+ add_column :versions, :object_changes, :jsonb # or :json
7
+
8
+ PaperTrail::Version.where.not(old_object_changes: nil).find_each do |version|
9
+ # This is an adaptation of PaperTrail internal load_changeset method,having in mind that we
10
+ # need to call also the code from PaperTrail::AttributeSerializer::ObjectChangesAttribute
11
+ object_changes = ActiveSupport::HashWithIndifferentAccess.new(YAML.unsafe_load(version.old_object_changes))
12
+ unless version.item_type.constantize.unscoped.find_by(id: version.item_id).nil?
13
+ # This is the deserialization code from `PaperTrail::AttributeSerializer::ObjectChangesAttribute`
14
+ # where we skip checking the object changeset column type, as we migrate it from YAML to JSON
15
+ changes_to_serialize = object_changes.clone
16
+ if changes_to_serialize.present?
17
+ serializer = PaperTrail::AttributeSerializers::CastAttributeSerializer.new(version.item_type.constantize)
18
+ changes_to_serialize.each do |key, change|
19
+ # `change` is an Array with two elements, representing before and after.
20
+ object_changes[key] = Array(change).map do |value|
21
+ serializer.send(:deserialize, key, value)
22
+ end
23
+ end
24
+ end
25
+ end
26
+
27
+ version.update_columns(old_object_changes: nil, object_changes:) # rubocop:disable Rails/SkipsModelValidations
28
+ rescue NameError
29
+ Rails.logger.info "Skipping History of #{version.item_type} with id #{version.item_id}"
30
+ end
31
+
32
+ PaperTrail::Version.reset_column_information
33
+ remove_column :versions, :old_object_changes
34
+ end
35
+
36
+ def down
37
+ raise ActiveRecord::IrreversibleMigration
38
+ end
39
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ class CreateDecidimTaxonomyFilters < ActiveRecord::Migration[7.0]
4
+ def change
5
+ create_table :decidim_taxonomy_filters do |t|
6
+ t.references :root_taxonomy, null: false, foreign_key: { to_table: :decidim_taxonomies }
7
+ t.integer :filter_items_count, null: false, default: 0
8
+ t.string :space_manifest, null: false
9
+ t.timestamps
10
+ end
11
+
12
+ create_table :decidim_taxonomy_filter_items do |t|
13
+ t.references :taxonomy_filter, null: false, index: true
14
+ t.references :taxonomy_item, null: false, foreign_key: { to_table: :decidim_taxonomies }
15
+ t.timestamps
16
+ end
17
+
18
+ add_index :decidim_taxonomy_filter_items, [:taxonomy_filter_id, :taxonomy_item_id], name: "index_taxonomy_filter_items_on_filter_id_and_item_id", unique: true
19
+
20
+ add_column :decidim_taxonomies, :filters_count, :integer, null: false, default: 0
21
+ add_column :decidim_taxonomies, :filter_items_count, :integer, null: false, default: 0
22
+ end
23
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddDeletedAtToDecidimComponents < ActiveRecord::Migration[7.0]
4
+ def change
5
+ add_column :decidim_components, :deleted_at, :datetime
6
+ add_index :decidim_components, :deleted_at
7
+ end
8
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddPartOfToTaxonomies < ActiveRecord::Migration[7.0]
4
+ class Taxonomy < ApplicationRecord
5
+ self.table_name = :decidim_taxonomies
6
+ belongs_to :parent, class_name: "Taxonomy", optional: true
7
+ end
8
+
9
+ def change
10
+ add_column :decidim_taxonomies, :part_of, :integer, array: true, default: [], null: false
11
+ add_index :decidim_taxonomies, :part_of, using: "gin"
12
+
13
+ reversible do |dir|
14
+ dir.up do
15
+ Taxonomy.find_each do |taxonomy|
16
+ if taxonomy.parent
17
+ taxonomy.part_of.clear.append(taxonomy.id).concat(taxonomy.parent.reload.part_of)
18
+ else
19
+ taxonomy.part_of.clear.append(taxonomy.id)
20
+ end
21
+ taxonomy.save
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddRoleToParticipatorySpacePrivateUsers < ActiveRecord::Migration[7.0]
4
+ def change
5
+ add_column :decidim_participatory_space_private_users, :role, :jsonb
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddPublishedToParticipatorySpacePrivateUsers < ActiveRecord::Migration[7.0]
4
+ def change
5
+ add_column :decidim_participatory_space_private_users, :published, :boolean, default: false
6
+ end
7
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ class CreatePrivateExports < ActiveRecord::Migration[7.0]
4
+ def change
5
+ create_table :decidim_private_exports, id: :uuid do |t|
6
+ t.string :export_type, null: false
7
+ t.string :attached_to_type
8
+ t.integer :attached_to_id
9
+ t.string :file
10
+ t.string :content_type, null: false
11
+ t.string :file_size, null: false
12
+ t.datetime :expires_at
13
+ t.jsonb :metadata, default: {}
14
+
15
+ t.timestamps
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddComponentCounterToTaxonomyFilters < ActiveRecord::Migration[7.0]
4
+ def change
5
+ add_column :decidim_taxonomy_filters, :components_count, :integer, null: false, default: 0
6
+ end
7
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddNamesAndSpaceBooleanToTaxonomyFilters < ActiveRecord::Migration[7.0]
4
+ def change
5
+ add_column :decidim_taxonomy_filters, :name, :jsonb, default: {}
6
+ add_column :decidim_taxonomy_filters, :internal_name, :jsonb, default: {}
7
+ add_column :decidim_taxonomy_filters, :space_filter, :boolean, null: false, default: false
8
+ end
9
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddTaxonomyToMetrics < ActiveRecord::Migration[7.0]
4
+ def change
5
+ add_reference :decidim_metrics, :decidim_taxonomy, index: true
6
+ end
7
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddParticipatorySpaceManifestsFromTaxonomyFilters < ActiveRecord::Migration[7.0]
4
+ def change
5
+ remove_column :decidim_taxonomy_filters, :space_manifest
6
+ remove_column :decidim_taxonomy_filters, :space_filter
7
+ add_column :decidim_taxonomy_filters, :participatory_space_manifests, :string, array: true, default: [], null: false
8
+ end
9
+ end
data/decidim-core.gemspec CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
22
22
  s.summary = "The core of the Decidim framework."
23
23
  s.description = "Adds core features so other engines can hook into the framework."
24
24
  s.license = "AGPL-3.0-or-later"
25
- s.required_ruby_version = "~> 3.2.0"
25
+ s.required_ruby_version = "~> 3.3.0"
26
26
 
27
27
  s.files = Dir.chdir(__dir__) do
28
28
  `git ls-files -z`.split("\x0").select do |f|
@@ -36,57 +36,54 @@ Gem::Specification.new do |s|
36
36
 
37
37
  s.add_dependency "active_link_to", "~> 1.0"
38
38
  s.add_dependency "acts_as_list", "~> 1.0"
39
- s.add_dependency "batch-loader", "~> 1.2"
40
- s.add_dependency "browser", "~> 2.7"
39
+ s.add_dependency "batch-loader", "~> 2.0"
40
+ s.add_dependency "browser", "~> 6.2.0"
41
41
  s.add_dependency "cells-erb", "~> 0.1.0"
42
42
  s.add_dependency "cells-rails", "~> 0.1.3"
43
43
  s.add_dependency "charlock_holmes", "~> 0.7"
44
+ s.add_dependency "chartkick", "~> 5.1.2"
44
45
  s.add_dependency "date_validator", "~> 0.12.0"
45
46
  s.add_dependency "devise", "~> 4.7"
46
- s.add_dependency "devise-i18n", "~> 1.2", "< 1.11.1"
47
+ s.add_dependency "devise-i18n", "~> 1.2"
47
48
  s.add_dependency "diffy", "~> 3.3"
48
49
  s.add_dependency "doorkeeper", "~> 5.6", ">= 5.6.6"
49
50
  s.add_dependency "doorkeeper-i18n", "~> 4.0"
50
51
  s.add_dependency "file_validators", "~> 3.0"
51
52
  s.add_dependency "fog-local", "~> 0.6"
52
- s.add_dependency "foundation_rails_helper", "~> 4.0"
53
53
  s.add_dependency "geocoder", "~> 1.8"
54
54
  s.add_dependency "hashdiff", ">= 0.4.0", "< 2.0.0"
55
+ s.add_dependency "hexapdf", "~> 1.1.0"
55
56
  s.add_dependency "image_processing", "~> 1.2"
56
57
  s.add_dependency "invisible_captcha", "~> 0.12"
57
58
  s.add_dependency "kaminari", "~> 1.2", ">= 1.2.1"
58
59
  s.add_dependency "loofah", "~> 2.19", ">= 2.19.1"
59
60
  s.add_dependency "mime-types", ">= 1.16", "< 4.0"
60
61
  s.add_dependency "mini_magick", "~> 4.9"
61
- s.add_dependency "net-smtp", "~> 0.3.1"
62
+ s.add_dependency "net-smtp", "~> 0.5.0"
62
63
  s.add_dependency "nokogiri", "~> 1.16", ">= 1.16.2"
63
64
  s.add_dependency "omniauth", "~> 2.0"
64
65
  s.add_dependency "omniauth-facebook", "~> 5.0"
65
66
  s.add_dependency "omniauth-google-oauth2", "~> 1.0"
66
67
  s.add_dependency "omniauth-rails_csrf_protection", "~> 1.0"
67
68
  s.add_dependency "omniauth-twitter", "~> 1.4"
68
- s.add_dependency "paper_trail", "~> 12.0"
69
- s.add_dependency "pg", "~> 1.4.0", "< 2"
69
+ s.add_dependency "paper_trail", "~> 16.0"
70
+ s.add_dependency "paranoia", "~> 3.0.0"
71
+ s.add_dependency "pg", "~> 1.5.0", "< 2"
70
72
  s.add_dependency "pg_search", "~> 2.2"
71
73
  s.add_dependency "premailer-rails", "~> 1.10"
72
- # We need psych 4+ in order to use the `aliases: true` option,
73
- # see https://stackoverflow.com/questions/71191685/visit-psych-nodes-alias-unknown-alias-default-psychbadalias
74
- # Also note that we need Rails 6.1.5+,
75
- # see https://gist.github.com/yahonda/2776d8d7b6ea7045359f38c10449937b
76
- s.add_dependency "psych", "~> 4.0"
77
74
  s.add_dependency "rack", "~> 2.2", ">= 2.2.8.1"
78
75
  s.add_dependency "rack-attack", "~> 6.0"
79
76
  s.add_dependency "rails", "~> 7.0.8"
80
77
  s.add_dependency "rails-i18n", "~> 7.0"
81
- s.add_dependency "ransack", "~> 3.2.1"
78
+ s.add_dependency "ransack", "~> 4.2.0"
82
79
  s.add_dependency "redis", "~> 4.1"
83
- s.add_dependency "request_store", "~> 1.5.0"
80
+ s.add_dependency "request_store", "~> 1.7.0"
84
81
  s.add_dependency "rubyXL", "~> 3.4"
85
82
  s.add_dependency "rubyzip", "~> 2.0"
86
83
  s.add_dependency "shakapacker", "~> 7.1.0"
87
- s.add_dependency "valid_email2", "~> 4.0"
84
+ s.add_dependency "valid_email2", "~> 7.0"
88
85
  s.add_dependency "web-push", "~> 3.0"
89
- s.add_dependency "wisper", "~> 2.0"
86
+ s.add_dependency "wisper", "~> 3.0"
90
87
 
91
88
  s.add_development_dependency "decidim-api", Decidim::Core.version
92
89
  s.add_development_dependency "decidim-dev", Decidim::Core.version
@@ -14,7 +14,7 @@ module Decidim
14
14
 
15
15
  def action_authorized_to(action, resource: nil, permissions_holder: nil)
16
16
  action_authorization_cache[action_authorization_cache_key(action, resource, permissions_holder)] ||=
17
- ::Decidim::ActionAuthorizer.new(current_user, action, permissions_holder || resource&.component || current_component, resource).authorize
17
+ ::Decidim::ActionAuthorizer.new(current_user, action, permissions_holder || resource.try(:component) || current_component, resource).authorize
18
18
  end
19
19
 
20
20
  def action_authorization_cache
@@ -29,7 +29,8 @@ module Decidim
29
29
  elsif permissions_holder
30
30
  "#{action}-#{permissions_holder.class.name}-#{permissions_holder.id}"
31
31
  else
32
- "#{action}-#{current_component.id}"
32
+ component = resource.try(:component) || current_component
33
+ "#{action}-#{component.id}"
33
34
  end
34
35
  end
35
36
  end
@@ -57,7 +57,7 @@ module Decidim
57
57
  when "participants"
58
58
  return only_amendables unless user
59
59
 
60
- where.not(id: joins(:amendable).where.not("decidim_amendments.decidim_user_id = ?", user.id))
60
+ where.not(id: joins(:amendable).where.not(decidim_amendments: { decidim_user_id: user.id }))
61
61
  else # Assume 'all'
62
62
  all
63
63
  end
@@ -10,9 +10,11 @@ module Decidim
10
10
  type: [ID, { null: true }],
11
11
  description: "Returns the sub-categories for the given parent category or top-level categories if set to `null`",
12
12
  required: false,
13
- prepare: lambda { |parent_id, _ctx|
14
- { parent_id: }
15
- }
13
+ prepare: :prepare_parent_id
14
+
15
+ def self.prepare_parent_id(parent_id, _ctx)
16
+ { parent_id: }
17
+ end
16
18
  end
17
19
  end
18
20
  end
@@ -9,40 +9,53 @@ module Decidim
9
9
  graphql_name "ComponentFilter"
10
10
  description "A type used for filtering any component parent objects"
11
11
 
12
- argument :type,
13
- type: GraphQL::Types::String,
14
- description: "Filters by type of component",
15
- required: false,
16
- prepare: lambda { |value, _ctx|
17
- { manifest_name: value.downcase }
18
- }
19
12
  argument :name,
20
13
  type: GraphQL::Types::String,
21
14
  description: "Filters by name of the component, additional locale parameter can be provided to specify in which to search",
22
15
  required: false,
23
- prepare: lambda { |search, ctx|
24
- lambda { |model_name, locale|
25
- locale = ctx[:current_organization].default_locale if locale.blank?
26
- op = Arel::Nodes::InfixOperation.new("->>", model_name.arel_table[:name], Arel::Nodes.build_quoted(locale))
27
- op.matches("%#{search}%")
28
- }
29
- }
16
+ prepare: :prepare_name
17
+
18
+ argument :type,
19
+ type: GraphQL::Types::String,
20
+ description: "Filters by type of component",
21
+ required: false,
22
+ prepare: :prepare_type
30
23
 
31
24
  argument :with_geolocation_enabled,
32
25
  type: GraphQL::Types::Boolean,
33
26
  description: "Returns components with geolocation activated (may be Proposals or Meetings)",
34
27
  required: false,
35
- prepare: lambda { |active, _ctx|
36
- ->(_model_name, _locale) { ["(settings->'global'->>'geocoding_enabled')::boolean is ? or manifest_name='meetings'", active] }
37
- }
28
+ prepare: :prepare_geolocation_enabled
38
29
 
39
30
  argument :with_comments_enabled,
40
31
  type: GraphQL::Types::Boolean,
41
32
  description: "Returns components with comments enabled globally (can still be deactivated in the current step if the component has steps)",
42
33
  required: false,
43
- prepare: lambda { |active, _ctx|
44
- ->(_model_name, _locale) { ["(settings->'global'->>'comments_enabled')::boolean is ?", active] }
45
- }
34
+ prepare: :prepare_comments_enabled
35
+
36
+ def self.prepare_comments_enabled(active, _ctx)
37
+ lambda do |_model_name, _locale|
38
+ ["(settings->'global'->>'comments_enabled')::boolean is ?", active]
39
+ end
40
+ end
41
+
42
+ def self.prepare_geolocation_enabled(active, _ctx)
43
+ lambda do |_model_name, _locale|
44
+ ["(settings->'global'->>'geocoding_enabled')::boolean is ? or manifest_name='meetings'", active]
45
+ end
46
+ end
47
+
48
+ def self.prepare_name(search, ctx)
49
+ lambda do |model_name, locale|
50
+ locale = ctx[:current_organization].default_locale if locale.blank?
51
+ op = Arel::Nodes::InfixOperation.new("->>", model_name.arel_table[:name], Arel::Nodes.build_quoted(locale))
52
+ op.matches("%#{search}%")
53
+ end
54
+ end
55
+
56
+ def self.prepare_type(value, _ctx)
57
+ { manifest_name: value.downcase }
58
+ end
46
59
  end
47
60
  end
48
61
  end
@@ -27,63 +27,72 @@ module Decidim
27
27
  ```
28
28
  "
29
29
 
30
- argument :type,
31
- type: String,
32
- description: "Filters by type of entity (User or UserGroup)",
30
+ argument :exclude_ids,
31
+ type: [ID],
32
+ description: "Excludes users contained in given ids. Valid values are one or more IDs (passed as an array)",
33
33
  required: false,
34
- prepare: lambda { |value, _ctx|
35
- type = value.downcase.camelcase
36
- type = "UserGroup" if %w(Group Usergroup).include?(type)
37
- { type: "Decidim::#{type}" }
38
- }
34
+ prepare: :prepare_exclude_ids
39
35
  argument :name,
40
36
  type: String,
41
37
  description: "Filters by name of the user entity. Searches (case-insensitive) any fragment of the provided string",
42
38
  required: false,
43
- prepare: lambda { |value, _ctx|
44
- [
45
- lambda { |model_class, _locale|
46
- model_class.arel_table[:name].matches("%#{value}%")
47
- }
48
- ]
49
- }
39
+ prepare: :prepare_name
50
40
  argument :nickname,
51
41
  type: String,
52
42
  description: "Filters by nickname of the user entity. Searches (case-insensitive) any fragment of the provided string",
53
43
  required: false,
54
- prepare: lambda { |value, _ctx|
55
- value = value[1..-1] if value.starts_with? "@"
56
- [
57
- lambda { |model_class, _locale|
58
- model_class.arel_table[:nickname].matches("%#{value}%")
59
- }
60
- ]
61
- }
44
+ prepare: :prepare_nickname
45
+ argument :type,
46
+ type: String,
47
+ description: "Filters by type of entity (User or UserGroup)",
48
+ required: false,
49
+ prepare: :prepare_type
62
50
  argument :wildcard,
63
51
  type: String,
64
52
  description: "Filters by nickname or name of the user entity. Searches (case-insensitive) any fragment of the provided string",
65
53
  required: false,
66
- prepare: lambda { |value, _ctx|
67
- value = value[1..-1] if value.starts_with? "@"
68
- [
69
- lambda { |model_class, _locale|
70
- op_name = model_class.arel_table[:name].matches("%#{value}%")
71
- op_nick = model_class.arel_table[:nickname].matches("%#{value}%")
72
- op_name.or(op_nick)
73
- }
74
- ]
75
- }
76
- argument :exclude_ids,
77
- type: [ID],
78
- description: "Excludes users contained in given ids. Valid values are one or more IDs (passed as an array)",
79
- required: false,
80
- prepare: lambda { |value, _ctx|
81
- [
82
- lambda { |model_class, _locale|
83
- model_class.arel_table[:id].not_in(value)
84
- }
85
- ]
86
- }
54
+ prepare: :prepare_wildcard
55
+ def self.prepare_nickname(value, _ctx)
56
+ value = value[1..-1] if value.starts_with? "@"
57
+ [
58
+ lambda do |model_class, _locale|
59
+ model_class.arel_table[:nickname].matches("%#{value}%")
60
+ end
61
+ ]
62
+ end
63
+
64
+ def self.prepare_name(value, _ctx)
65
+ [
66
+ lambda do |model_class, _locale|
67
+ model_class.arel_table[:name].matches("%#{value}%")
68
+ end
69
+ ]
70
+ end
71
+
72
+ def self.prepare_exclude_ids(value, _ctx)
73
+ [
74
+ lambda do |model_class, _locale|
75
+ model_class.arel_table[:id].not_in(value)
76
+ end
77
+ ]
78
+ end
79
+
80
+ def self.prepare_type(value, _ctx)
81
+ type = value.downcase.camelcase
82
+ type = "UserGroup" if %w(Group Usergroup).include?(type)
83
+ { type: "Decidim::#{type}" }
84
+ end
85
+
86
+ def self.prepare_wildcard(value, _ctx)
87
+ value = value[1..-1] if value.starts_with? "@"
88
+ [
89
+ lambda do |model_class, _locale|
90
+ op_name = model_class.arel_table[:name].matches("%#{value}%")
91
+ op_nick = model_class.arel_table[:nickname].matches("%#{value}%")
92
+ op_name.or(op_nick)
93
+ end
94
+ ]
95
+ end
87
96
  end
88
97
  end
89
98
  end
@@ -9,24 +9,26 @@ module Decidim
9
9
  description "A type used for sorting any component parent objects"
10
10
 
11
11
  argument :id, GraphQL::Types::String, "Sort by ID, valid values are ASC or DESC", required: false
12
- argument :weight, GraphQL::Types::String, "Sort by weight (order in the website), valid values are ASC or DESC", required: false
13
- argument :type,
14
- type: GraphQL::Types::String,
15
- description: "Sort by type of component, alphabetically, valid values are ASC or DESC",
16
- required: false,
17
- as: :manifest_name
18
12
  argument :name,
19
13
  type: GraphQL::Types::String,
20
14
  description: "Sort by name of the component, alphabetically, valid values are ASC or DESC",
21
15
  required: false,
22
16
  as: :name,
23
- prepare: lambda { |direction, ctx|
24
- lambda { |locale|
25
- locale = ctx[:current_organization].default_locale if locale.blank?
26
- field = Arel::Nodes::InfixOperation.new("->", Arel.sql("name"), Arel::Nodes.build_quoted(locale))
27
- Arel::Nodes::InfixOperation.new("", field, Arel.sql(direction.upcase))
28
- }
29
- }
17
+ prepare: :prepared_name
18
+ argument :type,
19
+ type: GraphQL::Types::String,
20
+ description: "Sort by type of component, alphabetically, valid values are ASC or DESC",
21
+ required: false,
22
+ as: :manifest_name
23
+ argument :weight, GraphQL::Types::String, "Sort by weight (order in the website), valid values are ASC or DESC", required: false
24
+
25
+ def self.prepared_name(direction, ctx)
26
+ lambda do |locale|
27
+ locale = ctx[:current_organization].default_locale if locale.blank?
28
+ field = Arel::Nodes::InfixOperation.new("->", Arel.sql("name"), Arel::Nodes.build_quoted(locale))
29
+ Arel::Nodes::InfixOperation.new("", field, Arel.sql(direction.upcase))
30
+ end
31
+ end
30
32
  end
31
33
  end
32
34
  end
@@ -7,10 +7,6 @@ module Decidim
7
7
  description "A type used for sorting any component parent objects"
8
8
 
9
9
  argument :id, GraphQL::Types::String, "Sort by ID, valid values are ASC or DESC", required: false
10
- argument :type,
11
- type: GraphQL::Types::String,
12
- description: "Sort by type of user entity (user or group), alphabetically, valid values are ASC or DESC",
13
- required: false
14
10
  argument :name,
15
11
  type: GraphQL::Types::String,
16
12
  description: "Sort by name of the user entity (user or group), alphabetically, valid values are ASC or DESC",
@@ -19,6 +15,10 @@ module Decidim
19
15
  type: GraphQL::Types::String,
20
16
  description: "Sort by nickname of the user entity (user or group), alphabetically, valid values are ASC or DESC",
21
17
  required: false
18
+ argument :type,
19
+ type: GraphQL::Types::String,
20
+ description: "Sort by type of user entity (user or group), alphabetically, valid values are ASC or DESC",
21
+ required: false
22
22
  end
23
23
  end
24
24
  end
@@ -9,6 +9,9 @@ module Decidim
9
9
  description "An author"
10
10
 
11
11
  field :id, ID, "The author ID", null: false
12
+
13
+ field :deleted, Boolean, "Whether the author's account has been deleted or not", null: false
14
+
12
15
  field :name, String, "The author's name", null: false
13
16
  field :nickname, String, "The author's nickname", null: false
14
17
 
@@ -21,8 +24,6 @@ module Decidim
21
24
  object.organization.name
22
25
  end
23
26
 
24
- field :deleted, Boolean, "Whether the author's account has been deleted or not", null: false
25
-
26
27
  def self.resolve_type(obj, _ctx)
27
28
  return Decidim::Core::UserType if obj.is_a? Decidim::User
28
29
  return Decidim::Core::UserGroupType if obj.is_a? Decidim::UserGroup
@@ -12,6 +12,11 @@ module Decidim
12
12
  description: "The total amount of co-authors that contributed to the entity. Note that this field may include also non-user authors like meetings or the organization",
13
13
  null: true
14
14
 
15
+ field :authors, [Decidim::Core::AuthorInterface, { null: true }],
16
+ method: :user_identities,
17
+ description: "The resource co-authors. Include only users or groups of users",
18
+ null: false
19
+
15
20
  field :author, Decidim::Core::AuthorInterface,
16
21
  description: "The resource author. Note that this can be null on official proposals or meeting-proposals",
17
22
  null: true
@@ -20,11 +25,6 @@ module Decidim
20
25
  author = object.creator_identity
21
26
  author if author.is_a?(Decidim::User) || author.is_a?(Decidim::UserGroup)
22
27
  end
23
-
24
- field :authors, [Decidim::Core::AuthorInterface, { null: true }],
25
- method: :user_identities,
26
- description: "The resource co-authors. Include only users or groups of users",
27
- null: false
28
28
  end
29
29
  end
30
30
  end