decidim-core 0.30.3 → 0.30.5
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.
- checksums.yaml +4 -4
- data/app/cells/decidim/activity_cell.rb +6 -0
- data/app/cells/decidim/card_g/show.erb +1 -1
- data/app/cells/decidim/notification/deleted.erb +12 -0
- data/app/cells/decidim/notification/not_available.erb +12 -0
- data/app/cells/decidim/notification_cell.rb +5 -1
- data/app/cells/decidim/share_widget/modal.erb +2 -1
- data/app/commands/decidim/destroy_account.rb +49 -4
- data/app/controllers/decidim/download_your_data_controller.rb +5 -2
- data/app/events/decidim/welcome_notification_event.rb +1 -1
- data/app/jobs/decidim/remove_search_indexes_job.rb +18 -0
- data/app/mailers/decidim/notifications_digest_mailer.rb +18 -1
- data/app/models/decidim/component.rb +3 -0
- data/app/models/decidim/notification.rb +10 -0
- data/app/models/decidim/private_export.rb +4 -0
- data/app/models/decidim/user.rb +4 -0
- data/app/models/decidim/user_base_entity.rb +1 -1
- data/app/packs/src/decidim/editor/extensions/link/index.js +0 -1
- data/app/packs/src/decidim/editor/index.js +5 -1
- data/app/packs/src/decidim/editor/test/extensions/link.test.js +2 -2
- data/app/packs/src/decidim/editor/test/toolbar/shared/behaves_like_basic_link.js +1 -1
- data/app/packs/src/decidim/map/controller/markers.js +3 -1
- data/app/packs/stylesheets/decidim/_footer.scss +5 -0
- data/app/packs/stylesheets/decidim/_modal.scss +5 -1
- data/app/packs/stylesheets/decidim/_modal_fingerprint.scss +1 -1
- data/app/presenters/decidim/log/user_presenter.rb +2 -1
- data/app/presenters/decidim/user_presenter.rb +6 -1
- data/app/services/decidim/download_your_data_exporter.rb +15 -4
- data/app/services/decidim/open_data_exporter.rb +2 -1
- data/app/views/decidim/download_your_data/_export.html.erb +1 -1
- data/app/views/decidim/export_mailer/download_your_data_export.html.erb +1 -1
- data/app/views/decidim/export_mailer/export.html.erb +1 -1
- data/app/views/decidim/pages/_tabbed.html.erb +1 -1
- data/app/views/decidim/shared/_orders.html.erb +1 -1
- data/app/views/layouts/decidim/header/_main_links_mobile_account.html.erb +15 -1
- data/config/locales/ar.yml +0 -4
- data/config/locales/bg.yml +0 -8
- data/config/locales/ca-IT.yml +17 -13
- data/config/locales/ca.yml +15 -11
- data/config/locales/cs.yml +9 -19
- data/config/locales/de.yml +5 -21
- data/config/locales/el.yml +0 -3
- data/config/locales/en.yml +21 -17
- data/config/locales/es-MX.yml +14 -10
- data/config/locales/es-PY.yml +14 -10
- data/config/locales/es.yml +13 -9
- data/config/locales/eu.yml +54 -51
- data/config/locales/fa-IR.yml +3 -0
- data/config/locales/fi-plain.yml +12 -8
- data/config/locales/fi.yml +12 -8
- data/config/locales/fr-CA.yml +23 -12
- data/config/locales/fr.yml +23 -12
- data/config/locales/ga-IE.yml +0 -4
- data/config/locales/gl.yml +0 -3
- data/config/locales/hu.yml +0 -6
- data/config/locales/id-ID.yml +0 -3
- data/config/locales/it.yml +3 -4
- data/config/locales/ja.yml +26 -22
- data/config/locales/ko.yml +3 -0
- data/config/locales/lb.yml +0 -3
- data/config/locales/lt.yml +0 -5
- data/config/locales/lv.yml +0 -3
- data/config/locales/mt.yml +3 -0
- data/config/locales/nl.yml +0 -3
- data/config/locales/no.yml +0 -3
- data/config/locales/pl.yml +11 -7
- data/config/locales/pt-BR.yml +552 -5
- data/config/locales/pt.yml +0 -3
- data/config/locales/ro-RO.yml +453 -126
- data/config/locales/ru.yml +0 -4
- data/config/locales/sk.yml +0 -3
- data/config/locales/sl.yml +0 -1
- data/config/locales/sv.yml +28 -13
- data/config/locales/tr-TR.yml +0 -5
- data/config/locales/uk.yml +0 -3
- data/config/locales/vi.yml +3 -0
- data/config/locales/zh-CN.yml +0 -3
- data/config/locales/zh-TW.yml +0 -5
- data/db/migrate/20250819110800_convert_private_exports_id_to_uuid.rb +55 -0
- data/decidim-core.gemspec +1 -0
- data/lib/decidim/core/engine.rb +1 -0
- data/lib/decidim/core/seeds.rb +3 -3
- data/lib/decidim/core/test/factories.rb +27 -2
- data/lib/decidim/core/test/shared_examples/comments_examples.rb +59 -5
- data/lib/decidim/core/test/shared_examples/fingerprint_examples.rb +13 -0
- data/lib/decidim/core/test/shared_examples/process_announcements_examples.rb +35 -1
- data/lib/decidim/core/version.rb +1 -1
- data/lib/decidim/events/base_event.rb +4 -0
- data/lib/decidim/has_private_users.rb +1 -0
- data/lib/decidim/seeds.rb +1 -1
- data/lib/decidim/webpacker/configuration.rb +5 -1
- data/lib/tasks/upgrade/clean.rake +11 -0
- data/lib/tasks/upgrade/decidim_fix_action_log.rake +28 -0
- data/lib/tasks/upgrade/decidim_remove_deleted_users_left_data_tasks.rake +30 -0
- data/lib/tasks/upgrade/fix_deleted_private_follows.rake +26 -0
- metadata +27 -6
|
@@ -64,7 +64,11 @@ module Decidim
|
|
|
64
64
|
end
|
|
65
65
|
|
|
66
66
|
def configuration_file_path
|
|
67
|
-
@configuration_file_path ||=
|
|
67
|
+
@configuration_file_path ||= if defined?(Rails) && Rails.env.test?
|
|
68
|
+
File.join(app_path, "tmp/webpacker_runtime#{ENV.fetch("TEST_ENV_NUMBER", "")}.yml")
|
|
69
|
+
else
|
|
70
|
+
File.join(app_path, "tmp/webpacker_runtime.yml")
|
|
71
|
+
end
|
|
68
72
|
end
|
|
69
73
|
|
|
70
74
|
def original_configuration_file_path
|
|
@@ -148,6 +148,17 @@ namespace :decidim do
|
|
|
148
148
|
invalid_private_exports.delete_all
|
|
149
149
|
end
|
|
150
150
|
|
|
151
|
+
desc "Remove invalid exports from ActiveStorage"
|
|
152
|
+
task remove_private_exports_attachments: :environment do
|
|
153
|
+
invalid = ActiveStorage::Attachment.where(record_type: "Decidim::PrivateExport", record_id: 0)
|
|
154
|
+
logger.info("=== Removing #{invalid.length} invalid PrivateExports attachments")
|
|
155
|
+
invalid.each(&:purge_later)
|
|
156
|
+
|
|
157
|
+
expired = Decidim::PrivateExport.where(expires_at: ..Time.zone.now).collect(&:file).compact_blank
|
|
158
|
+
logger.info("=== Removing #{expired.length} expired attachments from PrivateExports")
|
|
159
|
+
expired.each(&:purge_later) if expired.any?
|
|
160
|
+
end
|
|
161
|
+
|
|
151
162
|
def logger
|
|
152
163
|
@logger ||= Logger.new($stdout)
|
|
153
164
|
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
namespace :decidim do
|
|
4
|
+
namespace :upgrade do
|
|
5
|
+
desc "Fixes the visibility of menu_hidden action logs"
|
|
6
|
+
task :fix_action_log => :environment do
|
|
7
|
+
logger.info("Fixing action log menu_hidden actions...")
|
|
8
|
+
|
|
9
|
+
count = Decidim::ActionLog.where(action: "menu_hidden").where.not(visibility: "admin-only").count
|
|
10
|
+
logger.info "Found #{count} action logs to update."
|
|
11
|
+
if count.positive?
|
|
12
|
+
# ActionLog is a read-only model, so we need to use raw SQL to update the records
|
|
13
|
+
ActiveRecord::Base.connection.execute("UPDATE decidim_action_logs SET visibility = 'admin-only' WHERE action = 'menu_hidden'")
|
|
14
|
+
if Decidim::ActionLog.where(action: "menu_hidden").where.not(visibility: "admin-only").count.zero?
|
|
15
|
+
logger.info("Successfully updated #{count} action logs.")
|
|
16
|
+
else
|
|
17
|
+
logger.error("Failed to update all action logs. Please check the database.")
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
private
|
|
23
|
+
|
|
24
|
+
def logger
|
|
25
|
+
@logger ||= Logger.new($stdout)
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
namespace :decidim do
|
|
4
|
+
namespace :upgrade do
|
|
5
|
+
desc "Removes deleted users left behind data"
|
|
6
|
+
task remove_deleted_users_left_data: :environment do
|
|
7
|
+
logger.info("=== Removing left behind data by 'Decidim::DestroyAccount'")
|
|
8
|
+
Decidim::User.where.not(deleted_at: nil).find_each do |deleted_user|
|
|
9
|
+
Decidim::Follow.where(followable: deleted_user).find_each(&:destroy)
|
|
10
|
+
Decidim::Follow.where(user: deleted_user).find_each(&:destroy)
|
|
11
|
+
Decidim::ParticipatorySpacePrivateUser.where(user: deleted_user).find_each(&:destroy)
|
|
12
|
+
Decidim::Gamification::BadgeScore.where(user: deleted_user).find_each(&:destroy)
|
|
13
|
+
Decidim::UserModeration.where(user: deleted_user).find_each(&:destroy)
|
|
14
|
+
Decidim::Endorsement.where(author: deleted_user).find_each(&:destroy)
|
|
15
|
+
|
|
16
|
+
Decidim.participatory_space_manifests.each do |space_manifest|
|
|
17
|
+
space_manifest.invoke_on_destroy_account(deleted_user)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
deleted_user.identities.find_each(&:destroy)
|
|
21
|
+
deleted_user.versions.find_each(&:destroy)
|
|
22
|
+
deleted_user.private_exports.find_each(&:destroy)
|
|
23
|
+
deleted_user.access_grants.find_each(&:destroy)
|
|
24
|
+
deleted_user.access_tokens.find_each(&:destroy)
|
|
25
|
+
deleted_user.reminders.find_each(&:destroy)
|
|
26
|
+
deleted_user.notifications.find_each(&:destroy)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
namespace :decidim do
|
|
4
|
+
namespace :upgrade do
|
|
5
|
+
desc "Delete follows of private users deleted from a private space"
|
|
6
|
+
task fix_deleted_private_follows: :environment do
|
|
7
|
+
Decidim::Organization.all.each do |organization|
|
|
8
|
+
spaces = organization.participatory_spaces.collect { |space| space if space.respond_to?(:private_space?) && space.private_space? }.compact_blank
|
|
9
|
+
|
|
10
|
+
next if spaces.blank?
|
|
11
|
+
|
|
12
|
+
spaces = spaces.map { |space| space.respond_to?(:is_transparent?) ? (space unless space.is_transparent?) : space }.compact_blank
|
|
13
|
+
|
|
14
|
+
next if spaces.blank?
|
|
15
|
+
|
|
16
|
+
organization.users.find_each do |user|
|
|
17
|
+
next unless user.following_follows.count.positive?
|
|
18
|
+
|
|
19
|
+
spaces.each do |space|
|
|
20
|
+
Decidim::Admin::DestroyPrivateUsersFollowsJob.perform_later(user, space)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: decidim-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.30.
|
|
4
|
+
version: 0.30.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Josep Jaume Rey Peroy
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date:
|
|
13
|
+
date: 2026-01-28 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: concurrent-ruby
|
|
@@ -138,6 +138,20 @@ dependencies:
|
|
|
138
138
|
- - "~>"
|
|
139
139
|
- !ruby/object:Gem::Version
|
|
140
140
|
version: 5.1.2
|
|
141
|
+
- !ruby/object:Gem::Dependency
|
|
142
|
+
name: connection_pool
|
|
143
|
+
requirement: !ruby/object:Gem::Requirement
|
|
144
|
+
requirements:
|
|
145
|
+
- - "<"
|
|
146
|
+
- !ruby/object:Gem::Version
|
|
147
|
+
version: '3'
|
|
148
|
+
type: :runtime
|
|
149
|
+
prerelease: false
|
|
150
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
151
|
+
requirements:
|
|
152
|
+
- - "<"
|
|
153
|
+
- !ruby/object:Gem::Version
|
|
154
|
+
version: '3'
|
|
141
155
|
- !ruby/object:Gem::Dependency
|
|
142
156
|
name: date_validator
|
|
143
157
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -780,28 +794,28 @@ dependencies:
|
|
|
780
794
|
requirements:
|
|
781
795
|
- - '='
|
|
782
796
|
- !ruby/object:Gem::Version
|
|
783
|
-
version: 0.30.
|
|
797
|
+
version: 0.30.5
|
|
784
798
|
type: :development
|
|
785
799
|
prerelease: false
|
|
786
800
|
version_requirements: !ruby/object:Gem::Requirement
|
|
787
801
|
requirements:
|
|
788
802
|
- - '='
|
|
789
803
|
- !ruby/object:Gem::Version
|
|
790
|
-
version: 0.30.
|
|
804
|
+
version: 0.30.5
|
|
791
805
|
- !ruby/object:Gem::Dependency
|
|
792
806
|
name: decidim-dev
|
|
793
807
|
requirement: !ruby/object:Gem::Requirement
|
|
794
808
|
requirements:
|
|
795
809
|
- - '='
|
|
796
810
|
- !ruby/object:Gem::Version
|
|
797
|
-
version: 0.30.
|
|
811
|
+
version: 0.30.5
|
|
798
812
|
type: :development
|
|
799
813
|
prerelease: false
|
|
800
814
|
version_requirements: !ruby/object:Gem::Requirement
|
|
801
815
|
requirements:
|
|
802
816
|
- - '='
|
|
803
817
|
- !ruby/object:Gem::Version
|
|
804
|
-
version: 0.30.
|
|
818
|
+
version: 0.30.5
|
|
805
819
|
description: Adds core features so other engines can hook into the framework.
|
|
806
820
|
email:
|
|
807
821
|
- josepjaume@gmail.com
|
|
@@ -1035,7 +1049,9 @@ files:
|
|
|
1035
1049
|
- app/cells/decidim/newsletter_templates/image_text_cta_cell.rb
|
|
1036
1050
|
- app/cells/decidim/newsletter_templates/image_text_cta_settings_form/show.erb
|
|
1037
1051
|
- app/cells/decidim/newsletter_templates/image_text_cta_settings_form_cell.rb
|
|
1052
|
+
- app/cells/decidim/notification/deleted.erb
|
|
1038
1053
|
- app/cells/decidim/notification/moderated.erb
|
|
1054
|
+
- app/cells/decidim/notification/not_available.erb
|
|
1039
1055
|
- app/cells/decidim/notification/show.erb
|
|
1040
1056
|
- app/cells/decidim/notification_actions/base_cell.rb
|
|
1041
1057
|
- app/cells/decidim/notification_actions/buttons/show.erb
|
|
@@ -1425,6 +1441,7 @@ files:
|
|
|
1425
1441
|
- app/jobs/decidim/notification_generator_job.rb
|
|
1426
1442
|
- app/jobs/decidim/open_data_job.rb
|
|
1427
1443
|
- app/jobs/decidim/reminder_generator_job.rb
|
|
1444
|
+
- app/jobs/decidim/remove_search_indexes_job.rb
|
|
1428
1445
|
- app/jobs/decidim/resend_confirmation_instructions_job.rb
|
|
1429
1446
|
- app/jobs/decidim/update_search_indexes_job.rb
|
|
1430
1447
|
- app/jobs/decidim/user_report_job.rb
|
|
@@ -2511,6 +2528,7 @@ files:
|
|
|
2511
2528
|
- db/migrate/20241111104357_add_names_and_space_boolean_to_taxonomy_filters.rb
|
|
2512
2529
|
- db/migrate/20241127093708_add_taxonomy_to_metrics.rb
|
|
2513
2530
|
- db/migrate/20241204121445_add_participatory_space_manifests_from_taxonomy_filters.rb
|
|
2531
|
+
- db/migrate/20250819110800_convert_private_exports_id_to_uuid.rb
|
|
2514
2532
|
- db/seeds.rb
|
|
2515
2533
|
- db/seeds/Exampledocument.pdf
|
|
2516
2534
|
- db/seeds/avatars/001.jpg
|
|
@@ -3087,11 +3105,14 @@ files:
|
|
|
3087
3105
|
- lib/tasks/upgrade/decidim_attachments.rake
|
|
3088
3106
|
- lib/tasks/upgrade/decidim_content_blocks_tasks.rake
|
|
3089
3107
|
- lib/tasks/upgrade/decidim_deduplicate_endorsements.rake
|
|
3108
|
+
- lib/tasks/upgrade/decidim_fix_action_log.rake
|
|
3090
3109
|
- lib/tasks/upgrade/decidim_fix_nickname_uniqueness.rake
|
|
3091
3110
|
- lib/tasks/upgrade/decidim_fix_short_url_resolver.rake
|
|
3092
3111
|
- lib/tasks/upgrade/decidim_migrate_wysiwyg_content.rake
|
|
3093
3112
|
- lib/tasks/upgrade/decidim_moderation_tasks.rake
|
|
3113
|
+
- lib/tasks/upgrade/decidim_remove_deleted_users_left_data_tasks.rake
|
|
3094
3114
|
- lib/tasks/upgrade/decidim_user_moderation.rake
|
|
3115
|
+
- lib/tasks/upgrade/fix_deleted_private_follows.rake
|
|
3095
3116
|
- lib/tasks/upgrade/migrations.rake
|
|
3096
3117
|
homepage: https://decidim.org
|
|
3097
3118
|
licenses:
|