Sha256: 4a6f48df08d2c4515f858d8637a4424b8cdbcc045acebc9206cb7bab45652ea2
Contents?: true
Size: 1.03 KB
Versions: 10
Compression:
Stored size: 1.03 KB
Contents
# frozen_string_literal: true module Decidim module DirectVerifications module Verification module Admin class StatsController < Decidim::Admin::ApplicationController include NeedsPermission layout "decidim/admin/users" def index enforce_permission_to :index, :authorization stats = UserStats.new(current_organization) @stats = { t(".global") => stats_hash(stats) } current_organization.available_authorizations.map do |a| stats.authorization_handler = a @stats[t("#{a}.name", scope: "decidim.authorization_handlers")] = stats_hash(stats) end end private def stats_hash(stats) { registered: stats.registered, authorized: stats.authorized, unconfirmed: stats.unconfirmed, authorized_unconfirmed: stats.authorized_unconfirmed } end end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems