You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
576 B
23 lines
576 B
class Ecs::UsersController < Ecs::BaseController
|
|
skip_before_action :check_user_permission!
|
|
before_action :check_manager_permission!
|
|
|
|
def index
|
|
users = UserQuery.call(params)
|
|
|
|
@count = users.count
|
|
@users = paginate users.includes(user_extension: [:school, :department])
|
|
@manager_ids = current_major_school.ec_major_school_users.pluck(:user_id)
|
|
end
|
|
|
|
private
|
|
|
|
def current_major_school
|
|
@_ec_major_school ||= EcMajorSchool.find(params[:ec_major_school_id])
|
|
end
|
|
|
|
def current_school
|
|
@_current_school ||= current_major_school.school
|
|
end
|
|
end
|