Skip to content
Snippets Groups Projects
Commit 98f7afb9 authored by farhatahmad's avatar farhatahmad Committed by Jesus Federico
Browse files

Fixed issue with user list (#589)

parent ce2c9c18
Branches
Tags
No related merge requests found
...@@ -170,12 +170,14 @@ class AdminsController < ApplicationController ...@@ -170,12 +170,14 @@ class AdminsController < ApplicationController
# Gets the list of users based on your configuration # Gets the list of users based on your configuration
def user_list def user_list
list = if @role.present? initial_list = if current_user.has_role? :super_admin
User.with_role(@role.to_sym).where.not(id: current_user.id)
else
User.where.not(id: current_user.id) User.where.not(id: current_user.id)
else
User.without_role(:super_admin).where.not(id: current_user.id)
end end
list = @role.present? ? initial_list.with_role(@role.to_sym) : initial_list
if Rails.configuration.loadbalanced_configuration if Rails.configuration.loadbalanced_configuration
list.where(provider: user_settings_provider) list.where(provider: user_settings_provider)
.admins_search(@search) .admins_search(@search)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment