decidim-core 0.31.0.rc2 → 0.31.1
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 +1 -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 +12 -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/controllers/dropdown/controller.js +2 -2
- data/app/packs/src/decidim/controllers/multiple_mentions/controller.js +25 -2
- data/app/packs/src/decidim/datepicker/generate_datepicker.js +6 -0
- data/app/packs/src/decidim/datepicker/generate_timepicker.js +9 -0
- 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/index.js +10 -5
- data/app/packs/src/decidim/map/controller/markers.js +3 -1
- data/app/packs/stylesheets/decidim/_conversations.scss +1 -1
- data/app/packs/stylesheets/decidim/_dropdown.scss +22 -5
- data/app/packs/stylesheets/decidim/_filters.scss +1 -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/organization_presenter.rb +4 -0
- 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/manifests/show.json.erb +1 -0
- 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 +19 -19
- data/config/locales/de.yml +10 -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 +67 -55
- data/config/locales/fa-IR.yml +3 -0
- data/config/locales/fi-plain.yml +22 -8
- data/config/locales/fi.yml +22 -8
- data/config/locales/fr-CA.yml +33 -12
- data/config/locales/fr.yml +33 -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 +2 -3
- data/config/locales/ja.yml +46 -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 +626 -5
- data/config/locales/pt.yml +0 -3
- data/config/locales/ro-RO.yml +480 -121
- 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/data/20251108232118_add_dummy_migration.rb +11 -0
- data/db/data/20251125144141_add_short_name_to_organizations.rb +35 -0
- data/db/migrate/20250819110800_convert_private_exports_id_to_uuid.rb +55 -0
- data/db/migrate/20251031150928_add_short_name_to_organization.rb +7 -0
- data/decidim-core.gemspec +2 -0
- data/lib/decidim/core/engine.rb +9 -0
- data/lib/decidim/core/seeds.rb +2 -2
- data/lib/decidim/core/test/factories.rb +32 -2
- data/lib/decidim/core/test/shared_examples/comments_examples.rb +51 -1
- data/lib/decidim/core/test/shared_examples/fingerprint_examples.rb +13 -0
- 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/shakapacker/configuration.rb +5 -1
- data/lib/tasks/decidim_procfile.rake +1 -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 +44 -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/shakapacker_runtime#{ENV.fetch("TEST_ENV_NUMBER", "")}.yml")
|
|
69
|
+
else
|
|
70
|
+
File.join(app_path, "tmp/shakapacker_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::Like.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.31.
|
|
4
|
+
version: 0.31.1
|
|
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,34 @@ 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'
|
|
155
|
+
- !ruby/object:Gem::Dependency
|
|
156
|
+
name: data_migrate
|
|
157
|
+
requirement: !ruby/object:Gem::Requirement
|
|
158
|
+
requirements:
|
|
159
|
+
- - "~>"
|
|
160
|
+
- !ruby/object:Gem::Version
|
|
161
|
+
version: '11.3'
|
|
162
|
+
type: :runtime
|
|
163
|
+
prerelease: false
|
|
164
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
165
|
+
requirements:
|
|
166
|
+
- - "~>"
|
|
167
|
+
- !ruby/object:Gem::Version
|
|
168
|
+
version: '11.3'
|
|
141
169
|
- !ruby/object:Gem::Dependency
|
|
142
170
|
name: date_validator
|
|
143
171
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -800,28 +828,28 @@ dependencies:
|
|
|
800
828
|
requirements:
|
|
801
829
|
- - '='
|
|
802
830
|
- !ruby/object:Gem::Version
|
|
803
|
-
version: 0.31.
|
|
831
|
+
version: 0.31.1
|
|
804
832
|
type: :development
|
|
805
833
|
prerelease: false
|
|
806
834
|
version_requirements: !ruby/object:Gem::Requirement
|
|
807
835
|
requirements:
|
|
808
836
|
- - '='
|
|
809
837
|
- !ruby/object:Gem::Version
|
|
810
|
-
version: 0.31.
|
|
838
|
+
version: 0.31.1
|
|
811
839
|
- !ruby/object:Gem::Dependency
|
|
812
840
|
name: decidim-dev
|
|
813
841
|
requirement: !ruby/object:Gem::Requirement
|
|
814
842
|
requirements:
|
|
815
843
|
- - '='
|
|
816
844
|
- !ruby/object:Gem::Version
|
|
817
|
-
version: 0.31.
|
|
845
|
+
version: 0.31.1
|
|
818
846
|
type: :development
|
|
819
847
|
prerelease: false
|
|
820
848
|
version_requirements: !ruby/object:Gem::Requirement
|
|
821
849
|
requirements:
|
|
822
850
|
- - '='
|
|
823
851
|
- !ruby/object:Gem::Version
|
|
824
|
-
version: 0.31.
|
|
852
|
+
version: 0.31.1
|
|
825
853
|
description: Adds core features so other engines can hook into the framework.
|
|
826
854
|
email:
|
|
827
855
|
- josepjaume@gmail.com
|
|
@@ -1044,7 +1072,9 @@ files:
|
|
|
1044
1072
|
- app/cells/decidim/newsletter_templates/image_text_cta_cell.rb
|
|
1045
1073
|
- app/cells/decidim/newsletter_templates/image_text_cta_settings_form/show.erb
|
|
1046
1074
|
- app/cells/decidim/newsletter_templates/image_text_cta_settings_form_cell.rb
|
|
1075
|
+
- app/cells/decidim/notification/deleted.erb
|
|
1047
1076
|
- app/cells/decidim/notification/moderated.erb
|
|
1077
|
+
- app/cells/decidim/notification/not_available.erb
|
|
1048
1078
|
- app/cells/decidim/notification/show.erb
|
|
1049
1079
|
- app/cells/decidim/notification_actions/base_cell.rb
|
|
1050
1080
|
- app/cells/decidim/notification_actions/buttons/show.erb
|
|
@@ -1389,6 +1419,7 @@ files:
|
|
|
1389
1419
|
- app/jobs/decidim/open_data_job.rb
|
|
1390
1420
|
- app/jobs/decidim/process_inactive_participant_job.rb
|
|
1391
1421
|
- app/jobs/decidim/reminder_generator_job.rb
|
|
1422
|
+
- app/jobs/decidim/remove_search_indexes_job.rb
|
|
1392
1423
|
- app/jobs/decidim/resend_confirmation_instructions_job.rb
|
|
1393
1424
|
- app/jobs/decidim/update_search_indexes_job.rb
|
|
1394
1425
|
- app/jobs/decidim/user_report_job.rb
|
|
@@ -2227,6 +2258,8 @@ files:
|
|
|
2227
2258
|
- config/locales/zh-CN.yml
|
|
2228
2259
|
- config/locales/zh-TW.yml
|
|
2229
2260
|
- config/routes.rb
|
|
2261
|
+
- db/data/20251108232118_add_dummy_migration.rb
|
|
2262
|
+
- db/data/20251125144141_add_short_name_to_organizations.rb
|
|
2230
2263
|
- db/migrate/20160817115213_devise_create_decidim_users.rb
|
|
2231
2264
|
- db/migrate/20160919104837_create_decidim_organizations.rb
|
|
2232
2265
|
- db/migrate/20160920140207_devise_invitable_add_to_decidim_users.rb
|
|
@@ -2472,6 +2505,8 @@ files:
|
|
|
2472
2505
|
- db/migrate/20250603103953_add_refresh_tokens_enabled_to_doorkeeper_applications.rb
|
|
2473
2506
|
- db/migrate/20250609073104_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb
|
|
2474
2507
|
- db/migrate/20250613122148_remove_hashtag_table_from_core.rb
|
|
2508
|
+
- db/migrate/20250819110800_convert_private_exports_id_to_uuid.rb
|
|
2509
|
+
- db/migrate/20251031150928_add_short_name_to_organization.rb
|
|
2475
2510
|
- db/seeds.rb
|
|
2476
2511
|
- db/seeds/Exampledocument.pdf
|
|
2477
2512
|
- db/seeds/avatars/001.jpg
|
|
@@ -3034,12 +3069,15 @@ files:
|
|
|
3034
3069
|
- lib/tasks/upgrade/decidim_change_valuator_tasks.rake
|
|
3035
3070
|
- lib/tasks/upgrade/decidim_content_blocks_tasks.rake
|
|
3036
3071
|
- lib/tasks/upgrade/decidim_deduplicate_likes.rake
|
|
3072
|
+
- lib/tasks/upgrade/decidim_fix_action_log.rake
|
|
3037
3073
|
- lib/tasks/upgrade/decidim_fix_nickname_uniqueness.rake
|
|
3038
3074
|
- lib/tasks/upgrade/decidim_fix_short_url_resolver.rake
|
|
3039
3075
|
- lib/tasks/upgrade/decidim_migrate_wysiwyg_content.rake
|
|
3040
3076
|
- lib/tasks/upgrade/decidim_moderation_tasks.rake
|
|
3041
3077
|
- lib/tasks/upgrade/decidim_paper_trail_valuation_assignment.rake
|
|
3078
|
+
- lib/tasks/upgrade/decidim_remove_deleted_users_left_data_tasks.rake
|
|
3042
3079
|
- lib/tasks/upgrade/decidim_user_moderation.rake
|
|
3080
|
+
- lib/tasks/upgrade/fix_deleted_private_follows.rake
|
|
3043
3081
|
- lib/tasks/upgrade/migrations.rake
|
|
3044
3082
|
- lib/tasks/upgrade/user_groups_migration.rake
|
|
3045
3083
|
homepage: https://decidim.org
|