Module: Decidim::Verifications

Includes:
ActiveSupport::Configurable
Defined in:
lib/decidim/verifications/version.rb,
lib/decidim/verifications.rb,
lib/decidim/verifications/engine.rb,
lib/decidim/verifications/adapter.rb,
lib/decidim/verifications/registry.rb,
lib/decidim/verifications/workflows.rb,
lib/decidim/verifications/sms/engine.rb,
app/models/decidim/verifications/conflict.rb,
app/models/decidim/verifications/csv_datum.rb,
lib/decidim/verifications/csv_census/admin.rb,
lib/decidim/verifications/csv_census/engine.rb,
lib/decidim/verifications/workflow_manifest.rb,
lib/decidim/verifications/id_documents/admin.rb,
lib/decidim/verifications/id_documents/engine.rb,
lib/decidim/verifications/postal_letter/admin.rb,
lib/decidim/verifications/sms/example_gateway.rb,
lib/decidim/verifications/postal_letter/engine.rb,
app/cells/decidim/verifications/revocations_cell.rb,
app/models/decidim/verifications/csv_census/data.rb,
app/queries/decidim/verifications/authorizations.rb,
app/commands/decidim/verifications/authorize_user.rb,
lib/decidim/verifications/csv_census/admin_engine.rb,
app/models/decidim/verifications/csv_census/status.rb,
app/models/decidim/verifications/application_record.rb,
lib/decidim/verifications/default_action_authorizer.rb,
lib/decidim/verifications/id_documents/admin_engine.rb,
app/helpers/decidim/verifications/application_helper.rb,
lib/decidim/verifications/postal_letter/admin_engine.rb,
app/forms/decidim/verifications/sms/confirmation_form.rb,
app/forms/decidim/verifications/sms/mobile_phone_form.rb,
app/forms/decidim/verifications/csv_census/census_form.rb,
app/uploaders/decidim/verifications/attachment_uploader.rb,
app/controllers/concerns/decidim/verifications/renewable.rb,
app/forms/decidim/verifications/id_documents/upload_form.rb,
app/events/decidim/verifications/managed_user_error_event.rb,
app/jobs/decidim/verifications/csv_census/application_job.rb,
app/forms/decidim/verifications/postal_letter/address_form.rb,
app/forms/decidim/verifications/postal_letter/postage_form.rb,
app/cells/decidim/verifications/authorization_metadata_cell.rb,
app/commands/decidim/verifications/revoke_all_authorizations.rb,
app/controllers/decidim/verifications/application_controller.rb,
app/queries/decidim/verifications/authorizations_before_date.rb,
app/commands/decidim/verifications/confirm_user_authorization.rb,
app/commands/decidim/verifications/destroy_user_authorization.rb,
app/commands/decidim/verifications/perform_authorization_step.rb,
app/forms/decidim/verifications/id_documents/information_form.rb,
app/forms/decidim/verifications/id_documents/admin/config_form.rb,
app/controllers/decidim/verifications/authorizations_controller.rb,
app/forms/decidim/verifications/postal_letter/confirmation_form.rb,
app/jobs/decidim/verifications/csv_census/remove_duplicates_job.rb,
app/forms/decidim/verifications/csv_census/admin/census_data_form.rb,
app/forms/decidim/verifications/admin/revocations_before_date_form.rb,
app/commands/decidim/verifications/id_documents/admin/update_config.rb,
app/controllers/decidim/verifications/sms/authorizations_controller.rb,
app/controllers/decidim/verifications/admin/verifications_controller.rb,
app/commands/decidim/verifications/revoke_by_condition_authorizations.rb,
app/commands/decidim/verifications/csv_census/admin/create_census_data.rb,
app/forms/decidim/verifications/id_documents/information_rejection_form.rb,
app/controllers/decidim/verifications/csv_census/admin/census_controller.rb,
app/presenters/decidim/verifications/id_documents/authorization_presenter.rb,
app/commands/decidim/verifications/csv_census/confirm_census_authorization.rb,
app/controllers/decidim/verifications/csv_census/authorizations_controller.rb,
app/controllers/decidim/verifications/id_documents/admin/config_controller.rb,
app/presenters/decidim/verifications/postal_letter/authorization_presenter.rb,
app/controllers/decidim/verifications/id_documents/authorizations_controller.rb,
app/forms/decidim/verifications/id_documents/admin/offline_confirmation_form.rb,
app/controllers/decidim/verifications/postal_letter/admin/postages_controller.rb,
app/controllers/decidim/verifications/postal_letter/authorizations_controller.rb,
app/controllers/decidim/verifications/id_documents/admin/rejections_controller.rb,
app/controllers/decidim/verifications/id_documents/admin/confirmations_controller.rb,
app/commands/decidim/verifications/id_documents/admin/confirm_user_offline_authorization.rb,
app/controllers/decidim/verifications/id_documents/admin/offline_confirmations_controller.rb,
app/controllers/decidim/verifications/id_documents/admin/pending_authorizations_controller.rb,
app/controllers/decidim/verifications/postal_letter/admin/pending_authorizations_controller.rb

Overview

This holds the decidim-verifications version.

Defined Under Namespace

Modules: Admin, ApplicationHelper, CsvCensus, IdDocuments, PostalLetter, Renewable, Sms Classes: Adapter, ApplicationController, ApplicationRecord, AttachmentUploader, AuthorizationMetadataCell, Authorizations, AuthorizationsBeforeDate, AuthorizationsController, AuthorizeUser, ConfirmUserAuthorization, Conflict, CsvDatum, DefaultActionAuthorizer, DestroyUserAuthorization, Engine, InvalidVerificationRoute, ManagedUserErrorEvent, MissingEngine, MissingVerificationRoute, PerformAuthorizationStep, Registry, RevocationsCell, RevokeAllAuthorizations, RevokeByConditionAuthorizations, UnregisteredVerificationManifest, WorkflowManifest

Class Method Summary collapse

Class Method Details

.admin_workflowsObject

Collection of registered verification workflows having an admin engine



56
57
58
# File 'lib/decidim/verifications/workflows.rb', line 56

def admin_workflows
  workflows.select(&:admin_engine)
end

.find_workflow_manifest(name) ⇒ Object

Finds a verification workflow by name



42
43
44
# File 'lib/decidim/verifications/workflows.rb', line 42

def find_workflow_manifest(name)
  workflows.find { |workflow| workflow.name == name.to_s }
end

.register_workflow(name) ⇒ Object

Registers a new verification workflow using the workflow manifest API



26
27
28
# File 'lib/decidim/verifications/workflows.rb', line 26

def register_workflow(name, &)
  registry.register_workflow(name, &)
end

.reset_workflowsObject

Restores registered verification workflows to the array being passed in

Useful for testing.



19
20
21
# File 'lib/decidim/verifications/workflows.rb', line 19

def reset_workflows(*)
  registry.reset_workflows(*)
end

.unregister_workflow(name) ⇒ Object

Unregisters a verification workflow using the workflow manifest API



33
34
35
36
37
# File 'lib/decidim/verifications/workflows.rb', line 33

def unregister_workflow(name)
  manifest = find_workflow_manifest(name)

  registry.unregister_workflow(manifest)
end

.versionObject



6
7
8
# File 'lib/decidim/verifications/version.rb', line 6

def self.version
  "0.29.1"
end

.workflowsObject

Collection of registered verification workflows



49
50
51
# File 'lib/decidim/verifications/workflows.rb', line 49

def workflows
  registry.workflow_collection
end