Allowed admins to share room with themselves (#2442)

This commit is contained in:
Ahmad Farhat
2021-01-18 18:34:42 -05:00
committed by GitHub
parent 0e8e188e24
commit 957bf88a85
5 changed files with 6 additions and 4 deletions

View File

@ -209,7 +209,7 @@ class UsersController < ApplicationController
roles_can_appear << role.name if role.get_permission("can_appear_in_share_list") && role.priority >= 0
end
initial_list = User.where.not(uid: current_user.uid)
initial_list = User.where.not(uid: params[:owner_uid])
.with_role(roles_can_appear)
.shared_list_search(params[:search])
.pluck_to_hash(:uid, :name)