Class: Decidim::Admin::ImpersonatableUsersController

Inherits:
ApplicationController show all
Includes:
Officializations::Filterable
Defined in:
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

Instance Method Details

#indexObject



17
18
19
20
21
22
23
24
25
26
# File 'app/controllers/decidim/admin/impersonatable_users_controller.rb', line 17

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