Class: Decidim::Verifications::CsvCensus::ConfirmCensusAuthorization

Inherits:
Decidim::Verifications::ConfirmUserAuthorization show all
Defined in:
app/commands/decidim/verifications/csv_census/confirm_census_authorization.rb

Constant Summary

Constants inherited from Decidim::Verifications::ConfirmUserAuthorization

Decidim::Verifications::ConfirmUserAuthorization::MAX_FAILED_ATTEMPTS

Instance Method Summary collapse

Methods inherited from Decidim::Verifications::ConfirmUserAuthorization

#initialize

Constructor Details

This class inherits a constructor from Decidim::Verifications::ConfirmUserAuthorization

Instance Method Details

#callObject



7
8
9
10
11
12
13
14
15
16
# File 'app/commands/decidim/verifications/csv_census/confirm_census_authorization.rb', line 7

def call
  return broadcast(:invalid) unless form.valid?

  if confirmation_successful?
    authorization.grant!
    broadcast(:ok)
  else
    broadcast(:invalid)
  end
end