Sha256: c693822df3a676f75bb940b2714874c3974866020d47f087802ff8b67b2f8271

Contents?: true

Size: 648 Bytes

Versions: 10

Compression:

Stored size: 648 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Admin
    module ManagedUsers
      # Controller that allows inspecting impersonation logs
      #
      class ImpersonationLogsController < Decidim::Admin::ApplicationController
        layout "decidim/admin/users"

        def index
          enforce_permission_to :index, :impersonatable_user

          @impersonation_logs = Decidim::ImpersonationLog.where(user:).order(started_at: :desc).page(params[:page]).per(15)
        end

        private

        def user
          @user ||= current_organization.users.find(params[:impersonatable_user_id])
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
decidim-admin-0.29.1 app/controllers/decidim/admin/managed_users/impersonation_logs_controller.rb
decidim-admin-0.28.4 app/controllers/decidim/admin/managed_users/impersonation_logs_controller.rb
decidim-admin-0.29.0 app/controllers/decidim/admin/managed_users/impersonation_logs_controller.rb
decidim-admin-0.28.3 app/controllers/decidim/admin/managed_users/impersonation_logs_controller.rb
decidim-admin-0.29.0.rc4 app/controllers/decidim/admin/managed_users/impersonation_logs_controller.rb
decidim-admin-0.29.0.rc3 app/controllers/decidim/admin/managed_users/impersonation_logs_controller.rb
decidim-admin-0.29.0.rc2 app/controllers/decidim/admin/managed_users/impersonation_logs_controller.rb
decidim-admin-0.29.0.rc1 app/controllers/decidim/admin/managed_users/impersonation_logs_controller.rb
decidim-admin-0.28.2 app/controllers/decidim/admin/managed_users/impersonation_logs_controller.rb
decidim-admin-0.28.1 app/controllers/decidim/admin/managed_users/impersonation_logs_controller.rb