decidim-core 0.30.0 → 0.30.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/address/show.erb +3 -3
- data/app/cells/decidim/author/show.erb +1 -1
- data/app/cells/decidim/content_blocks/participatory_space_extra_data/extra_data.erb +2 -2
- data/app/cells/decidim/participatory_space_dropdown_metadata/metadata.erb +4 -4
- data/app/commands/decidim/create_report.rb +5 -1
- data/app/commands/decidim/invite_user.rb +1 -1
- data/app/controllers/concerns/decidim/participatory_space_context.rb +4 -1
- data/app/controllers/decidim/reports_controller.rb +6 -1
- data/app/forms/decidim/ephemeral_user_form.rb +1 -1
- data/app/forms/decidim/omniauth_registration_form.rb +1 -1
- data/app/forms/decidim/registration_form.rb +1 -1
- data/app/helpers/decidim/menu_helper.rb +2 -2
- data/app/helpers/decidim/paginate_helper.rb +1 -1
- data/app/helpers/decidim/tooltip_helper.rb +4 -1
- data/app/mailers/decidim/notifications_digest_mailer.rb +7 -1
- data/app/mailers/decidim/reported_mailer.rb +17 -2
- data/app/packs/src/decidim/input_character_counter.js +1 -1
- data/app/packs/stylesheets/decidim/_cards.scss +1 -1
- data/app/packs/stylesheets/decidim/_header.scss +54 -35
- data/app/packs/stylesheets/decidim/resource_history.scss +14 -4
- data/app/permissions/decidim/default_permissions.rb +2 -0
- data/app/presenters/decidim/notification_to_mailer_presenter.rb +7 -3
- data/app/queries/decidim/last_activity.rb +25 -0
- data/app/views/decidim/messaging/conversations/_reply_form.html.erb +1 -2
- data/app/views/decidim/messaging/conversations/_start.html.erb +1 -1
- data/app/views/decidim/reported_mailer/hidden_manually.html.erb +25 -0
- data/app/views/decidim/shared/_results_per_page.html.erb +1 -1
- data/app/views/kaminari/decidim/_page.html.erb +1 -1
- data/app/views/kaminari/decidim/_paginator.html.erb +1 -1
- data/app/views/layouts/decidim/_logo.html.erb +2 -2
- data/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown_desktop.html.erb +5 -11
- data/app/views/layouts/decidim/header/_menu_breadcrumb_mobile_tablet.html.erb +5 -5
- data/config/locales/ar.yml +0 -7
- data/config/locales/bg.yml +0 -7
- data/config/locales/ca-IT.yml +12 -1
- data/config/locales/ca.yml +12 -1
- data/config/locales/cs.yml +23 -12
- data/config/locales/de.yml +26 -11
- data/config/locales/el.yml +0 -7
- data/config/locales/en.yml +12 -1
- data/config/locales/es-MX.yml +13 -2
- data/config/locales/es-PY.yml +13 -2
- data/config/locales/es.yml +12 -1
- data/config/locales/eu.yml +17 -5
- data/config/locales/fi-plain.yml +0 -15
- data/config/locales/fi.yml +0 -15
- data/config/locales/fr-CA.yml +14 -8
- data/config/locales/fr.yml +14 -8
- data/config/locales/gl.yml +0 -5
- data/config/locales/hu.yml +0 -7
- data/config/locales/id-ID.yml +0 -5
- data/config/locales/is-IS.yml +0 -5
- data/config/locales/it.yml +0 -5
- data/config/locales/ja.yml +16 -14
- data/config/locales/lb.yml +0 -5
- data/config/locales/lt.yml +0 -7
- data/config/locales/lv.yml +0 -5
- data/config/locales/nl.yml +0 -5
- data/config/locales/no.yml +0 -5
- data/config/locales/pl.yml +0 -7
- data/config/locales/pt-BR.yml +0 -7
- data/config/locales/pt.yml +0 -5
- data/config/locales/ro-RO.yml +0 -14
- data/config/locales/ru.yml +0 -5
- data/config/locales/sk.yml +0 -5
- data/config/locales/sv.yml +36 -12
- data/config/locales/tr-TR.yml +0 -5
- data/config/locales/uk.yml +0 -5
- data/config/locales/zh-CN.yml +0 -5
- data/config/locales/zh-TW.yml +0 -7
- data/db/migrate/20171212103803_create_unique_nicknames.rb +1 -1
- data/db/migrate/20180221101934_fix_nickname_index.rb +1 -1
- data/db/migrate/20180706104107_add_nickname_to_managed_users.rb +1 -1
- data/db/migrate/20181001124950_move_users_groups_to_users_table.rb +1 -1
- data/db/migrate/20190412131728_fix_user_names.rb +1 -1
- data/lib/decidim/core/test/factories.rb +12 -0
- data/lib/decidim/core/test/shared_examples/map_examples.rb +2 -2
- data/lib/decidim/core/version.rb +1 -1
- data/lib/decidim/nicknamizable.rb +6 -9
- data/lib/decidim/private_download_helper.rb +3 -3
- data/lib/tasks/upgrade/clean.rake +9 -1
- data/lib/tasks/upgrade/decidim_fix_nickname_uniqueness.rake +1 -1
- data/lib/tasks/upgrade/migrations.rake +2 -0
- metadata +8 -7
- /data/app/views/decidim/reported_mailer/{hide.html.erb → hidden_automatically.html.erb} +0 -0
@@ -203,8 +203,8 @@ shared_examples "a record with front-end geocoding address field" do |geocoded_m
|
|
203
203
|
# geocoding should be bypassed in this situation which is why these match
|
204
204
|
# what was returned by the front-end geocoding. These values are returned by
|
205
205
|
# the dummy test geocoding API defined at
|
206
|
-
# `decidim-dev/lib/decidim/dev/test/
|
207
|
-
#
|
206
|
+
# `decidim-dev/lib/decidim/dev/test/map_server.rb`. Search for
|
207
|
+
# `serve_autocomplete`.
|
208
208
|
expect(page).to have_content("successfully")
|
209
209
|
final = if geocoded_record
|
210
210
|
geocoded_model.find(geocoded_record.id)
|
data/lib/decidim/core/version.rb
CHANGED
@@ -27,19 +27,16 @@ module Decidim
|
|
27
27
|
# * Disambiguates it so it is unique.
|
28
28
|
#
|
29
29
|
# name - the String to nicknamize
|
30
|
-
#
|
30
|
+
# organization_id - the organization id we are using as scope for the uniqueness
|
31
31
|
#
|
32
32
|
# Example to nicknamize a user name, scoped to the organization:
|
33
33
|
#
|
34
|
-
# nicknamize(user_name,
|
34
|
+
# nicknamize(user_name, organization_id)
|
35
35
|
#
|
36
|
-
def nicknamize(name,
|
36
|
+
def nicknamize(name, organization_id)
|
37
37
|
return unless name
|
38
38
|
|
39
|
-
disambiguate(
|
40
|
-
name.parameterize(separator: "_")[nickname_length_range],
|
41
|
-
scope
|
42
|
-
)
|
39
|
+
disambiguate(name.parameterize(separator: "_")[nickname_length_range], organization_id)
|
43
40
|
end
|
44
41
|
|
45
42
|
private
|
@@ -48,11 +45,11 @@ module Decidim
|
|
48
45
|
(0...nickname_max_length)
|
49
46
|
end
|
50
47
|
|
51
|
-
def disambiguate(name,
|
48
|
+
def disambiguate(name, organization_id)
|
52
49
|
candidate = name
|
53
50
|
|
54
51
|
2.step do |n|
|
55
|
-
return candidate if Decidim::UserBaseEntity.where(nickname: candidate.downcase).where(
|
52
|
+
return candidate if Decidim::UserBaseEntity.where(nickname: candidate.downcase).where(decidim_organization_id: organization_id).empty?
|
56
53
|
|
57
54
|
candidate = numbered_variation_of(name, n)
|
58
55
|
end
|
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
module Decidim
|
4
4
|
module PrivateDownloadHelper
|
5
|
-
def attach_archive(export_data,
|
5
|
+
def attach_archive(export_data, file_name, user, export_type = nil)
|
6
6
|
private_exports = user.private_exports.build
|
7
|
-
private_exports.export_type =
|
8
|
-
private_exports.file.attach(io: StringIO.open(FileZipper.new(export_data.filename(
|
7
|
+
private_exports.export_type = export_type || file_name
|
8
|
+
private_exports.file.attach(io: StringIO.open(FileZipper.new(export_data.filename(file_name), export_data.read).zip), filename: "#{file_name}.zip")
|
9
9
|
private_exports.expires_at = Decidim.download_your_data_expiry_time.from_now
|
10
10
|
private_exports.metadata = {}
|
11
11
|
private_exports.save!
|
@@ -11,7 +11,8 @@ namespace :decidim do
|
|
11
11
|
:"decidim:upgrade:clean:categories",
|
12
12
|
:"decidim:upgrade:clean:action_logs",
|
13
13
|
:"decidim:upgrade:clean:clean_deleted_users",
|
14
|
-
:"decidim:upgrade:clean:fix_blocked_user_notification"
|
14
|
+
:"decidim:upgrade:clean:fix_blocked_user_notification",
|
15
|
+
:"decidim:upgrade:clean:invalid_private_exports"
|
15
16
|
]
|
16
17
|
|
17
18
|
desc "Remove data from deleted users"
|
@@ -140,6 +141,13 @@ namespace :decidim do
|
|
140
141
|
logger.info("===== Updated #{blocked_users} blocked users")
|
141
142
|
end
|
142
143
|
|
144
|
+
desc "Removes all the invalid records from private downloads"
|
145
|
+
task invalid_private_exports: :environment do
|
146
|
+
invalid_private_exports = Decidim::PrivateExport.where("export_type ~ '^survey_user_answers_[0-9a-f]{64}$'")
|
147
|
+
logger.info("=== Removing #{invalid_private_exports.length} private exports")
|
148
|
+
invalid_private_exports.delete_all
|
149
|
+
end
|
150
|
+
|
143
151
|
def logger
|
144
152
|
@logger ||= Logger.new($stdout)
|
145
153
|
end
|
@@ -16,7 +16,7 @@ namespace :decidim do
|
|
16
16
|
has_changed << user.id
|
17
17
|
end
|
18
18
|
rescue ActiveRecord::RecordInvalid, ActiveRecord::RecordNotUnique
|
19
|
-
update_user_nickname(user, Decidim::UserBaseEntity.nicknamize(user.nickname,
|
19
|
+
update_user_nickname(user, Decidim::UserBaseEntity.nicknamize(user.nickname, user.decidim_organization_id))
|
20
20
|
has_changed << user.id
|
21
21
|
rescue ActiveRecord::RecordInvalid # rubocop:disable Lint/DuplicateRescueException
|
22
22
|
logger.warn("User ID (#{user.id}) : #{e}")
|
@@ -75,7 +75,9 @@ namespace :decidim do
|
|
75
75
|
end
|
76
76
|
|
77
77
|
new_source = "#{magic_comments}#{inserted_comment}#{source}"
|
78
|
+
|
78
79
|
old_source = File.binread(target_file)
|
80
|
+
old_source = old_source.gsub(/# This file has been modified by `decidim upgrade:migrations` task on (.*)\n/, "")
|
79
81
|
|
80
82
|
return if old_source == new_source
|
81
83
|
|
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.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: 2025-
|
13
|
+
date: 2025-06-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: concurrent-ruby
|
@@ -780,28 +780,28 @@ dependencies:
|
|
780
780
|
requirements:
|
781
781
|
- - '='
|
782
782
|
- !ruby/object:Gem::Version
|
783
|
-
version: 0.30.
|
783
|
+
version: 0.30.1
|
784
784
|
type: :development
|
785
785
|
prerelease: false
|
786
786
|
version_requirements: !ruby/object:Gem::Requirement
|
787
787
|
requirements:
|
788
788
|
- - '='
|
789
789
|
- !ruby/object:Gem::Version
|
790
|
-
version: 0.30.
|
790
|
+
version: 0.30.1
|
791
791
|
- !ruby/object:Gem::Dependency
|
792
792
|
name: decidim-dev
|
793
793
|
requirement: !ruby/object:Gem::Requirement
|
794
794
|
requirements:
|
795
795
|
- - '='
|
796
796
|
- !ruby/object:Gem::Version
|
797
|
-
version: 0.30.
|
797
|
+
version: 0.30.1
|
798
798
|
type: :development
|
799
799
|
prerelease: false
|
800
800
|
version_requirements: !ruby/object:Gem::Requirement
|
801
801
|
requirements:
|
802
802
|
- - '='
|
803
803
|
- !ruby/object:Gem::Version
|
804
|
-
version: 0.30.
|
804
|
+
version: 0.30.1
|
805
805
|
description: Adds core features so other engines can hook into the framework.
|
806
806
|
email:
|
807
807
|
- josepjaume@gmail.com
|
@@ -2080,7 +2080,8 @@ files:
|
|
2080
2080
|
- app/views/decidim/pages/show.html.erb
|
2081
2081
|
- app/views/decidim/participatory_space_private_users/_participatory_space_private_user.html.erb
|
2082
2082
|
- app/views/decidim/profiles/show.html.erb
|
2083
|
-
- app/views/decidim/reported_mailer/
|
2083
|
+
- app/views/decidim/reported_mailer/hidden_automatically.html.erb
|
2084
|
+
- app/views/decidim/reported_mailer/hidden_manually.html.erb
|
2084
2085
|
- app/views/decidim/reported_mailer/report.html.erb
|
2085
2086
|
- app/views/decidim/searches/_count.html.erb
|
2086
2087
|
- app/views/decidim/searches/_filters.html.erb
|
File without changes
|