Skip to content

Commit d4097d3

Browse files
authored
Fix login in loginModal for all controllers and update to 0.12.4 (#430)
* add needs_hashcash to all controllers based on decidim::applicationcontroller * update to 0.12.4 * fix dependabot for nokogiri and thor versions * update gemfile to 0.29.4 and package.json too * change install of chrome * change chrome to current version * fix spec based on #431 * add test to test hashcash in proposals
1 parent 1fcf371 commit d4097d3

File tree

11 files changed

+338
-5311
lines changed

11 files changed

+338
-5311
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ env:
1111
SIMPLECOV: 1
1212
NODE_VERSION: 18.17.1
1313
RUBY_VERSION: 3.2.8
14-
CHROME_VERSION: "126.0.6478.182"
1514
BUNDLE_GEMFILE: Gemfile
1615
DISABLE_SPRING: 1
1716
DISPLAY: ":99"
@@ -153,6 +152,7 @@ jobs:
153152
wget --no-verbose -O /tmp/chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
154153
sudo dpkg -i /tmp/chrome.deb
155154
rm /tmp/chrome.deb
155+
156156
- uses: nanasess/setup-chromedriver@v2
157157
name: Install Chrome version
158158

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Features:
1010
- Added application context for config constraints (whether the user is logged or not)
1111
- Allow to granular permissions to forced verifications.
1212
**NOTE** Config var `force_authorization_after_login` has changed to `force_authorizations`
13+
- Fix use of hashcash in loginModals
1314

1415
v0.12.3
1516
-------

Gemfile.lock

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
decidim-decidim_awesome (0.12.3)
4+
decidim-decidim_awesome (0.12.4)
55
active_hashcash (~> 0.4.0)
66
decidim-admin (>= 0.29.1, < 0.30)
77
decidim-core (>= 0.29.1, < 0.30)
@@ -87,7 +87,7 @@ GEM
8787
addressable (2.8.7)
8888
public_suffix (>= 2.0.2, < 7.0)
8989
ast (2.4.3)
90-
base64 (0.2.0)
90+
base64 (0.3.0)
9191
batch-loader (1.5.0)
9292
bcrypt (3.1.20)
9393
better_html (2.1.1)
@@ -97,7 +97,7 @@ GEM
9797
erubi (~> 1.4)
9898
parser (>= 2.4)
9999
smart_properties
100-
bigdecimal (3.1.9)
100+
bigdecimal (3.2.2)
101101
bindex (0.8.1)
102102
bootsnap (1.18.6)
103103
msgpack (~> 1.2)
@@ -141,7 +141,7 @@ GEM
141141
crass (1.0.6)
142142
css_parser (1.21.1)
143143
addressable
144-
csv (3.3.4)
144+
csv (3.3.5)
145145
dartsass (1.49.8)
146146
date (3.4.1)
147147
date_validator (0.12.0)
@@ -348,11 +348,11 @@ GEM
348348
warden (~> 1.2.3)
349349
devise-i18n (1.11.0)
350350
devise (>= 4.9.0)
351-
devise_invitable (2.0.10)
351+
devise_invitable (2.0.11)
352352
actionmailer (>= 5.0)
353353
devise (>= 4.6)
354354
diff-lcs (1.6.2)
355-
diffy (3.4.3)
355+
diffy (3.4.4)
356356
doc2text (0.4.8)
357357
nokogiri (>= 1.18.2)
358358
rubyzip (~> 2.3.0)
@@ -371,7 +371,7 @@ GEM
371371
temple
372372
erubi (1.13.1)
373373
escape_utils (1.3.0)
374-
excon (1.2.5)
374+
excon (1.2.8)
375375
logger
376376
extended-markdown-filter (0.7.0)
377377
html-pipeline (~> 2.9)
@@ -382,11 +382,11 @@ GEM
382382
railties (>= 6.1.0)
383383
faker (3.5.2)
384384
i18n (>= 1.8.11, < 2)
385-
faraday (2.13.1)
385+
faraday (2.13.4)
386386
faraday-net_http (>= 2.0, < 3.5)
387387
json
388388
logger
389-
faraday-net_http (3.4.0)
389+
faraday-net_http (3.4.1)
390390
net-http (>= 0.5.0)
391391
ffi (1.17.2)
392392
file_validators (3.0.0)
@@ -399,7 +399,7 @@ GEM
399399
mime-types
400400
fog-local (0.9.0)
401401
fog-core (>= 1.27, < 3.0)
402-
formatador (1.1.0)
402+
formatador (1.1.1)
403403
foundation_rails_helper (4.0.1)
404404
actionpack (>= 4.1, < 7.1)
405405
activemodel (>= 4.1, < 7.1)
@@ -459,8 +459,8 @@ GEM
459459
invisible_captcha (0.13.0)
460460
rails (>= 3.2.0)
461461
io-console (0.8.1)
462-
json (2.12.0)
463-
jwt (2.10.1)
462+
json (2.13.2)
463+
jwt (3.1.2)
464464
base64
465465
kaminari (1.2.2)
466466
activesupport (>= 4.1.0)
@@ -504,7 +504,7 @@ GEM
504504
mime-types (3.7.0)
505505
logger
506506
mime-types-data (~> 3.2025, >= 3.2025.0507)
507-
mime-types-data (3.2025.0520)
507+
mime-types-data (3.2025.0729)
508508
mini_magick (4.13.2)
509509
mini_mime (1.1.5)
510510
mini_portile2 (2.8.9)
@@ -514,7 +514,7 @@ GEM
514514
bigdecimal (~> 3.1)
515515
net-http (0.6.0)
516516
uri
517-
net-imap (0.5.8)
517+
net-imap (0.5.9)
518518
date
519519
net-protocol
520520
net-pop (0.1.2)
@@ -524,7 +524,7 @@ GEM
524524
net-smtp (0.3.4)
525525
net-protocol
526526
nio4r (2.7.4)
527-
nokogiri (1.18.8)
527+
nokogiri (1.18.9)
528528
mini_portile2 (~> 2.8.2)
529529
racc (~> 1.4)
530530
oauth (1.1.0)
@@ -533,7 +533,7 @@ GEM
533533
version_gem (~> 1.1)
534534
oauth-tty (1.0.5)
535535
version_gem (~> 1.1, >= 1.1.1)
536-
oauth2 (2.0.11)
536+
oauth2 (2.0.12)
537537
faraday (>= 0.17.3, < 4.0)
538538
jwt (>= 1.0, < 4.0)
539539
logger (~> 1.2)
@@ -574,7 +574,7 @@ GEM
574574
parallel (1.27.0)
575575
parallel_tests (4.10.1)
576576
parallel
577-
parser (3.3.8.0)
577+
parser (3.3.9.0)
578578
ast (~> 2.4.1)
579579
racc
580580
pg (1.4.6)
@@ -597,7 +597,7 @@ GEM
597597
puma (6.6.0)
598598
nio4r (~> 2.0)
599599
racc (1.8.1)
600-
rack (2.2.16)
600+
rack (2.2.17)
601601
rack-attack (6.7.0)
602602
rack (>= 1.0, < 4)
603603
rack-cors (1.1.1)
@@ -645,7 +645,7 @@ GEM
645645
thor (~> 1.0)
646646
zeitwerk (~> 2.5)
647647
rainbow (3.1.1)
648-
rake (13.2.1)
648+
rake (13.3.0)
649649
ransack (3.2.1)
650650
activerecord (>= 6.1.5)
651651
activesupport (>= 6.1.5)
@@ -706,7 +706,7 @@ GEM
706706
rubocop-ast (>= 1.31.1, < 2.0)
707707
ruby-progressbar (~> 1.7)
708708
unicode-display_width (>= 2.4.0, < 3.0)
709-
rubocop-ast (1.44.1)
709+
rubocop-ast (1.46.0)
710710
parser (>= 3.3.7.2)
711711
prism (~> 1.4)
712712
rubocop-capybara (2.21.0)
@@ -732,7 +732,7 @@ GEM
732732
rubocop-rubycw (0.1.6)
733733
rubocop (~> 1.0)
734734
ruby-progressbar (1.13.0)
735-
ruby-vips (2.2.3)
735+
ruby-vips (2.2.4)
736736
ffi (~> 1.12)
737737
logger
738738
rubyXL (3.4.33)
@@ -771,11 +771,11 @@ GEM
771771
listen (>= 2.7, < 4.0)
772772
spring (>= 4)
773773
stringio (3.1.7)
774-
temple (0.10.3)
774+
temple (0.10.4)
775775
terminal-table (4.0.0)
776776
unicode-display_width (>= 1.1.1, < 4)
777-
thor (1.3.2)
778-
tilt (2.6.0)
777+
thor (1.4.0)
778+
tilt (2.6.1)
779779
timeout (0.4.3)
780780
trailblazer-option (0.1.2)
781781
tzinfo (2.0.6)
@@ -803,15 +803,15 @@ GEM
803803
activemodel (>= 6.0.0)
804804
bindex (>= 0.4.0)
805805
railties (>= 6.0.0)
806-
web-push (3.0.1)
807-
jwt (~> 2.0)
806+
web-push (3.0.2)
807+
jwt (~> 3.0)
808808
openssl (~> 3.0)
809809
webmock (3.25.1)
810810
addressable (>= 2.8.0)
811811
crack (>= 0.3.2)
812812
hashdiff (>= 0.4.0, < 2.0.0)
813813
websocket (1.2.11)
814-
websocket-driver (0.7.7)
814+
websocket-driver (0.8.0)
815815
base64
816816
websocket-extensions (>= 0.1.0)
817817
websocket-extensions (0.1.5)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
<!-- insert_after "erb[loud]:contains('sign_up')" -->
1+
<!-- insert_top ".login__modal-links" -->
22

33
<%= render partial: "decidim/decidim_awesome/hashcash/hidden_field", locals: { zone: :login } %>

app/views/decidim/decidim_awesome/hashcash/_hidden_field.html.erb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<% if defined?(awesome_hashcash_bits) && awesome_hashcash_bits(zone) %>
32
<% append_javascript_pack_tag("decidim_decidim_awesome_hashcash") %>
43
<%= hashcash_hidden_field_tag %>

lib/decidim/decidim_awesome/engine.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Engine < ::Rails::Engine
3030
# Add hashcash to signup and login
3131
Decidim::Devise::SessionsController.include(Decidim::DecidimAwesome::NeedsHashcash)
3232
Decidim::Devise::RegistrationsController.include(Decidim::DecidimAwesome::NeedsHashcash)
33-
Decidim::Components::BaseController.include(Decidim::DecidimAwesome::NeedsHashcash)
33+
Decidim::ApplicationController.include(Decidim::DecidimAwesome::NeedsHashcash)
3434
end
3535
# Include additional helpers globally
3636
ActiveSupport.on_load(:action_view) { include Decidim::DecidimAwesome::AwesomeHelpers }

lib/decidim/decidim_awesome/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module Decidim
44
# This holds the decidim-decidim_awesome version.
55
module DecidimAwesome
6-
VERSION = "0.12.3"
6+
VERSION = "0.12.4"
77
COMPAT_DECIDIM_VERSION = [">= 0.29.1", "< 0.30"].freeze
88
end
99
end

mise.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[env]
2+
RAILS_ENV="development"
3+
DATABASE_USERNAME="decidim_app"
4+
DATABASE_PASSWORD="decidim123456789"
5+
CENSUS_URL="http://webapps01.getxo.org/WSConsultaPadron/WSConsultaPadron.asmx"
6+
7+
[tools]
8+
node = "22"

0 commit comments

Comments
 (0)