decidim-admin 0.24.0.rc2 → 0.24.0
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/assets/javascripts/decidim/admin/application.js.es6 +1 -1
- data/app/controllers/concerns/decidim/admin/global_moderation_context.rb +5 -9
- data/app/views/decidim/admin/moderations/index.html.erb +1 -0
- data/config/locales/gl.yml +38 -0
- data/lib/decidim/admin/test/manage_moderations_examples.rb +19 -0
- data/lib/decidim/admin/version.rb +1 -1
- metadata +10 -11
- data/app/assets/javascripts/decidim/admin/gallery.js.es6 +0 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fb555dc87d8887f799a876b52770a8040c27de7bbcbd8576f7224b0d99195775
|
|
4
|
+
data.tar.gz: b7f5ef06d59e89fd49a983581a5df6b934d11639182153b37c05ee955bd3f001
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0a65449c96cc837c606fb1593da1a77023a8b1480946e8fbc7bba27193b4316bd858ee4d6a4967f7b13fabe1b2927c48d006b66cd1f9a1e0b20068e243459de7
|
|
7
|
+
data.tar.gz: 2739efc9276d7506ac9f958af7a0a09313fafee07638c38d4e91f8627159fce1e6716137ab03dc782c1f9241057c49fb0db0503d9d166554c7d1056c191b2a0b
|
|
@@ -15,9 +15,8 @@ module Decidim
|
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
# Private: Finds the participatory spaces the current user is admin to.
|
|
18
|
-
# This
|
|
19
|
-
#
|
|
20
|
-
# what moderations can the current user manage.
|
|
18
|
+
# This method will later be used to find out what moderations the
|
|
19
|
+
# current user can manage.
|
|
21
20
|
#
|
|
22
21
|
# Returns an Array.
|
|
23
22
|
def spaces_user_is_admin_to
|
|
@@ -27,7 +26,8 @@ module Decidim
|
|
|
27
26
|
.find_participatory_space_manifest(manifest.name)
|
|
28
27
|
.participatory_spaces
|
|
29
28
|
.call(current_organization)&.select do |space|
|
|
30
|
-
space.moderators.exists?(id: current_user.id)
|
|
29
|
+
space.moderators.exists?(id: current_user.id) ||
|
|
30
|
+
space.admins.exists?(id: current_user.id)
|
|
31
31
|
end
|
|
32
32
|
end
|
|
33
33
|
end
|
|
@@ -39,11 +39,7 @@ module Decidim
|
|
|
39
39
|
# Returns an `ActiveRecord::Relation`
|
|
40
40
|
def moderations_for_user
|
|
41
41
|
@moderations_for_user ||=
|
|
42
|
-
|
|
43
|
-
Decidim::Moderation.all
|
|
44
|
-
else
|
|
45
|
-
Decidim::Moderation.where(participatory_space: spaces_user_is_admin_to)
|
|
46
|
-
end
|
|
42
|
+
Decidim::Moderation.where(participatory_space: spaces_user_is_admin_to)
|
|
47
43
|
end
|
|
48
44
|
end
|
|
49
45
|
end
|
data/config/locales/gl.yml
CHANGED
|
@@ -31,6 +31,7 @@ gl:
|
|
|
31
31
|
subject: Asunto
|
|
32
32
|
organization:
|
|
33
33
|
alert_color: Alerta
|
|
34
|
+
available_authorizations: Autorizacións dispoñíbeis
|
|
34
35
|
badges_enabled: Activar emblemas
|
|
35
36
|
comments_max_length: Lonxitude máxima dos comentarios (0 para valor predefinido)
|
|
36
37
|
cta_button_path: Camiño do botón de chamada a acción
|
|
@@ -41,6 +42,8 @@ gl:
|
|
|
41
42
|
enable_omnipresent_banner: Mostrar o banner omnipresente
|
|
42
43
|
facebook_handler: Administrador de Facebook
|
|
43
44
|
favicon: Ícona
|
|
45
|
+
force_authentication: Forzar autenticación
|
|
46
|
+
force_users_to_authenticate_before_access_organization: Forzar aos usuarios a se autenticar antes de acceder á organización
|
|
44
47
|
from: Correo electrónico do remitente
|
|
45
48
|
github_handler: Xestor de GitHub
|
|
46
49
|
header_snippets: Fragmentos de cabeceira
|
|
@@ -53,6 +56,7 @@ gl:
|
|
|
53
56
|
highlighted_content_banner_image: Imaxe
|
|
54
57
|
highlighted_content_banner_short_description: Descrición curta
|
|
55
58
|
highlighted_content_banner_title: Título
|
|
59
|
+
host: Host
|
|
56
60
|
instagram_handler: Administrador de Instagram
|
|
57
61
|
logo: Logo
|
|
58
62
|
machine_translation_display_priority: Prioridade ao amosar as traducións automáticas
|
|
@@ -69,6 +73,7 @@ gl:
|
|
|
69
73
|
reference_prefix: Prefijo de referencia
|
|
70
74
|
rich_text_editor_in_public_views: Habilitar o editor de texto avanzado para os participantes
|
|
71
75
|
secondary_color: Secundaria
|
|
76
|
+
secondary_hosts: Hosts secundarios
|
|
72
77
|
send_welcome_notification: Enviar notificación de benvida
|
|
73
78
|
success_color: Éxito
|
|
74
79
|
time_zone: Fuso horario
|
|
@@ -116,6 +121,10 @@ gl:
|
|
|
116
121
|
allowed_file_content_types: Ficheiro de imaxe non válido
|
|
117
122
|
official_img_header:
|
|
118
123
|
allowed_file_content_types: Ficheiro de imaxe non válido
|
|
124
|
+
new_import:
|
|
125
|
+
attributes:
|
|
126
|
+
file:
|
|
127
|
+
invalid_mime_type: Tipo Mime non válido
|
|
119
128
|
activerecord:
|
|
120
129
|
attributes:
|
|
121
130
|
decidim/static_page:
|
|
@@ -142,6 +151,7 @@ gl:
|
|
|
142
151
|
category:
|
|
143
152
|
new: Nova categoría
|
|
144
153
|
export: Exportar
|
|
154
|
+
import: Importar
|
|
145
155
|
manage: Xestionar
|
|
146
156
|
new: Novo %{name}
|
|
147
157
|
newsletter:
|
|
@@ -300,6 +310,7 @@ gl:
|
|
|
300
310
|
success: O compoñente foi actualizado correctamente.
|
|
301
311
|
conflicts:
|
|
302
312
|
'false': 'Non'
|
|
313
|
+
managed_user_name: Usuario xestionado
|
|
303
314
|
solved: Resolto
|
|
304
315
|
title: Conflitos de verificación
|
|
305
316
|
transfer:
|
|
@@ -352,6 +363,11 @@ gl:
|
|
|
352
363
|
title_cont: Procurar %{collection} por título.
|
|
353
364
|
state_eq:
|
|
354
365
|
label: Estado
|
|
366
|
+
forms:
|
|
367
|
+
file_help:
|
|
368
|
+
import:
|
|
369
|
+
message_1: Están soportados os ficheiros CSV, JSON e Excel (.xls)
|
|
370
|
+
message_2: Para os ficheiros CSV, o separador entre columnas ten de ser o punto e coa (";")
|
|
355
371
|
help_sections:
|
|
356
372
|
error: Produciuse un erro ao actualizar as seccións de axuda
|
|
357
373
|
form:
|
|
@@ -390,6 +406,20 @@ gl:
|
|
|
390
406
|
impersonate_existing_managed_user: Substituír o usuario xestionado "%{name}"
|
|
391
407
|
impersonate_existing_user: Substitúe o usuario "%{name}"
|
|
392
408
|
impersonate_new_managed_user: Substituír o novo usuario xestor
|
|
409
|
+
imports:
|
|
410
|
+
error: Produciuse un problema durante a importación
|
|
411
|
+
help:
|
|
412
|
+
proposalcreator: O ficheiro ten de incluír os nomes de columna title/en e body/en (ou outro idioma da túa preferencia, por exemplo title/gl e body/gl). Admítense tamén as columnas scope/id e category/id.
|
|
413
|
+
import_from_file: Importar dende o ficheiro
|
|
414
|
+
new:
|
|
415
|
+
accepted_mime_types:
|
|
416
|
+
csv: csv
|
|
417
|
+
json: json
|
|
418
|
+
xls: xls
|
|
419
|
+
actions:
|
|
420
|
+
back: Volver
|
|
421
|
+
import: Importar
|
|
422
|
+
notice: "%{number}%{resource_name} importados con éxito"
|
|
393
423
|
logs:
|
|
394
424
|
logs_list:
|
|
395
425
|
no_logs_yet: Aínda non hai rexistros
|
|
@@ -477,6 +507,7 @@ gl:
|
|
|
477
507
|
created_at: Creado o
|
|
478
508
|
expires_at: Caduca o
|
|
479
509
|
last_used_at: Empregado por última vez
|
|
510
|
+
times_used: Veces utilizado
|
|
480
511
|
token: Token
|
|
481
512
|
user: Creado por
|
|
482
513
|
static_page:
|
|
@@ -506,10 +537,13 @@ gl:
|
|
|
506
537
|
moderated_users:
|
|
507
538
|
index:
|
|
508
539
|
actions:
|
|
540
|
+
block: Bloquear usuario
|
|
509
541
|
title: Accións
|
|
542
|
+
unblock: Desbloquear usuario
|
|
510
543
|
name: Nome
|
|
511
544
|
nickname: Alcume
|
|
512
545
|
reason: Motivo
|
|
546
|
+
title: Listando os usuarios reportados
|
|
513
547
|
report:
|
|
514
548
|
reasons:
|
|
515
549
|
offensive: Ofensivo
|
|
@@ -744,7 +778,11 @@ gl:
|
|
|
744
778
|
confirm_destroy: Estás certo/a de querer eliminar este token?
|
|
745
779
|
destroy: Eliminar
|
|
746
780
|
share: Compartir
|
|
781
|
+
destroy:
|
|
782
|
+
error: Produciuse un problema ao destruír o token.
|
|
747
783
|
share_tokens:
|
|
784
|
+
empty: Non hai tokens activos
|
|
785
|
+
help: Estes tokens empréganse para compartir publicamente con calquera usuario este recurso non publicado. Ocultaranse cando o recurso sexa publicado. Preme na icona de compartir token para visitar o URL compartíbel.
|
|
748
786
|
title: Compartir tokens
|
|
749
787
|
shared:
|
|
750
788
|
gallery:
|
|
@@ -24,6 +24,16 @@ shared_examples "manage moderations" do
|
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
context "when listing moderations" do
|
|
27
|
+
it "only lists moderations for the current organization" do
|
|
28
|
+
external_reportable = create :dummy_resource
|
|
29
|
+
external_moderation = create(:moderation, reportable: external_reportable, report_count: 1, reported_content: external_reportable.reported_searchable_content_text)
|
|
30
|
+
create(:report, moderation: external_moderation)
|
|
31
|
+
|
|
32
|
+
visit current_path
|
|
33
|
+
|
|
34
|
+
expect(page).to have_no_selector("tr[data-id=\"#{external_moderation.id}\"]")
|
|
35
|
+
end
|
|
36
|
+
|
|
27
37
|
it "user can review them" do
|
|
28
38
|
moderations.each do |moderation|
|
|
29
39
|
within "tr[data-id=\"#{moderation.id}\"]" do
|
|
@@ -91,6 +101,15 @@ shared_examples "manage moderations" do
|
|
|
91
101
|
reported_content_slice = moderation.reportable.reported_searchable_content_text.split("\n").first
|
|
92
102
|
expect(page).to have_content(reported_content_slice)
|
|
93
103
|
end
|
|
104
|
+
|
|
105
|
+
context "when the reported content does not exist" do
|
|
106
|
+
it "still renders the page" do
|
|
107
|
+
moderation.reportable.destroy
|
|
108
|
+
visit current_path
|
|
109
|
+
|
|
110
|
+
expect(page).to have_no_selector("tr[data-id=\"#{moderation.id}\"]")
|
|
111
|
+
end
|
|
112
|
+
end
|
|
94
113
|
end
|
|
95
114
|
|
|
96
115
|
context "when listing hidden resources" do
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: decidim-admin
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.24.0
|
|
4
|
+
version: 0.24.0
|
|
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: 2021-03-
|
|
13
|
+
date: 2021-03-26 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: active_link_to
|
|
@@ -32,14 +32,14 @@ dependencies:
|
|
|
32
32
|
requirements:
|
|
33
33
|
- - '='
|
|
34
34
|
- !ruby/object:Gem::Version
|
|
35
|
-
version: 0.24.0
|
|
35
|
+
version: 0.24.0
|
|
36
36
|
type: :runtime
|
|
37
37
|
prerelease: false
|
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
|
39
39
|
requirements:
|
|
40
40
|
- - '='
|
|
41
41
|
- !ruby/object:Gem::Version
|
|
42
|
-
version: 0.24.0
|
|
42
|
+
version: 0.24.0
|
|
43
43
|
- !ruby/object:Gem::Dependency
|
|
44
44
|
name: devise
|
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -130,28 +130,28 @@ dependencies:
|
|
|
130
130
|
requirements:
|
|
131
131
|
- - '='
|
|
132
132
|
- !ruby/object:Gem::Version
|
|
133
|
-
version: 0.24.0
|
|
133
|
+
version: 0.24.0
|
|
134
134
|
type: :development
|
|
135
135
|
prerelease: false
|
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
|
137
137
|
requirements:
|
|
138
138
|
- - '='
|
|
139
139
|
- !ruby/object:Gem::Version
|
|
140
|
-
version: 0.24.0
|
|
140
|
+
version: 0.24.0
|
|
141
141
|
- !ruby/object:Gem::Dependency
|
|
142
142
|
name: decidim-participatory_processes
|
|
143
143
|
requirement: !ruby/object:Gem::Requirement
|
|
144
144
|
requirements:
|
|
145
145
|
- - '='
|
|
146
146
|
- !ruby/object:Gem::Version
|
|
147
|
-
version: 0.24.0
|
|
147
|
+
version: 0.24.0
|
|
148
148
|
type: :development
|
|
149
149
|
prerelease: false
|
|
150
150
|
version_requirements: !ruby/object:Gem::Requirement
|
|
151
151
|
requirements:
|
|
152
152
|
- - '='
|
|
153
153
|
- !ruby/object:Gem::Version
|
|
154
|
-
version: 0.24.0
|
|
154
|
+
version: 0.24.0
|
|
155
155
|
description: Organization administration to manage a single organization.
|
|
156
156
|
email:
|
|
157
157
|
- josepjaume@gmail.com
|
|
@@ -175,7 +175,6 @@ files:
|
|
|
175
175
|
- app/assets/javascripts/decidim/admin/dynamic_fields.component.js.es6
|
|
176
176
|
- app/assets/javascripts/decidim/admin/field_dependent_inputs.component.js.es6
|
|
177
177
|
- app/assets/javascripts/decidim/admin/form.js.es6
|
|
178
|
-
- app/assets/javascripts/decidim/admin/gallery.js.es6
|
|
179
178
|
- app/assets/javascripts/decidim/admin/import_guidance.js.es6
|
|
180
179
|
- app/assets/javascripts/decidim/admin/managed_users.js.es6
|
|
181
180
|
- app/assets/javascripts/decidim/admin/moderations.js.es6
|
|
@@ -732,9 +731,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
732
731
|
version: '2.7'
|
|
733
732
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
734
733
|
requirements:
|
|
735
|
-
- - "
|
|
734
|
+
- - ">="
|
|
736
735
|
- !ruby/object:Gem::Version
|
|
737
|
-
version:
|
|
736
|
+
version: '0'
|
|
738
737
|
requirements: []
|
|
739
738
|
rubygems_version: 3.1.2
|
|
740
739
|
signing_key:
|