File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Adds a missing rake task for revoking SMS verifications.
2+ # Decidim is supposed to add this task in decidim-verifications/lib/tasks/revoke.rake
3+ # But this file is evaluated before the initializers have a chance to configure the
4+ # Decidim.sms_gateway_service (in our decidim initializer) and register the sms
5+ # verification workflow (in decidim-verifications/lib/decidim/verifications/sms/engine.rb)
6+ #
7+ # See https://github.com/decidim/decidim/issues/16546 where this bug is reported and tracked.
8+
9+ namespace :decidim do
10+ namespace :verifications do
11+ namespace :revoke do
12+ desc "Revokes authorizations for the sms workflow"
13+ task :sms , [ ] => :environment do
14+ logger . info ( "=== Revoking authorizations for the sms workflow" )
15+ Decidim ::Authorization . where ( name : :sms ) . destroy_all
16+ logger . info ( "===== Done" )
17+ end
18+ end
19+ end
20+ end
You can’t perform that action at this time.
0 commit comments