Update scope query for new teacher definition

This commit is contained in:
Sebastian Serth
2022-09-20 11:31:25 +02:00
committed by Sebastian Serth
parent 964048927a
commit 02c65af034
4 changed files with 18 additions and 10 deletions

View File

@ -68,7 +68,7 @@ class InternalUsersController < ApplicationController
def index
@search = InternalUser.ransack(params[:q], {auth_object: current_user})
@users = @search.result.includes(:consumer).order(:name).paginate(page: params[:page], per_page: per_page_param)
@users = @search.result.in_study_group_of(current_user).includes(:consumer).order(:name).paginate(page: params[:page], per_page: per_page_param)
authorize!
end