Class: Decidim::Admin::ImpersonatableUsersController

Inherits:
ApplicationController show all
Defined in:
decidim-admin/app/controllers/decidim/admin/impersonatable_users_controller.rb

Overview

Controller that lists users in order to perform impersonation actions on them

Instance Method Summary collapse

Methods inherited from ApplicationController

#permission_class_chain, #permission_scope, #user_has_no_permission_path, #user_not_authorized_path

Methods included from HttpCachingDisabler

#disable_http_caching

Methods included from NeedsSnippets

#snippets

Methods included from RegistersPermissions

register_permissions

Methods included from NeedsOrganization

enhance_controller, extended, included

Instance Method Details

#indexObject


13
14
15
16
17
18
19
20
21
22
# File 'decidim-admin/app/controllers/decidim/admin/impersonatable_users_controller.rb', line 13

def index
  enforce_permission_to :index, :impersonatable_user

  @query = params[:q]
  @state = params[:state]

  @users = Decidim::Admin::UserFilter.for(collection, @query, @state)
                                     .page(params[:page])
                                     .per(15)
end