module AuthLh::UserManagement::ClassMethods
Public Instance Methods
all_external()
click to toggle source
# File lib/auth_lh/user_management.rb, line 24 def all_external @cached_users ||= auth_api.get_users({ pagination: 'false' }) end
all_external_with_all_roles(role_ids)
click to toggle source
# File lib/auth_lh/user_management.rb, line 38 def all_external_with_all_roles(role_ids) all_external.find_all { |x| role_ids.any? { |role_id| x.has_all_roles?(role_id) } } end
all_external_with_role(role_id)
click to toggle source
# File lib/auth_lh/user_management.rb, line 28 def all_external_with_role(role_id) all_external.find_all { |x| x.has_role?(role_id) } end
all_external_with_some_role(role_ids)
click to toggle source
# File lib/auth_lh/user_management.rb, line 32 def all_external_with_some_role(role_ids) all_external.find_all { |x| role_ids.any? { |role_id| x.has_some_role?(role_id) } } end
clear_cache!()
click to toggle source
# File lib/auth_lh/user_management.rb, line 72 def clear_cache! @cached_users = nil end
find_external(login)
click to toggle source
# File lib/auth_lh/user_management.rb, line 44 def find_external(login) all_external.find { |x| x.login == login.to_s } end
find_external_with_all_roles(role_ids)
click to toggle source
# File lib/auth_lh/user_management.rb, line 56 def find_external_with_all_roles(role_ids) all_external_with_all_roles(role_ids).first end
find_external_with_role(role_id)
click to toggle source
# File lib/auth_lh/user_management.rb, line 48 def find_external_with_role(role_id) all_external_with_role(role_id).first end
find_external_with_some_role(role_ids)
click to toggle source
# File lib/auth_lh/user_management.rb, line 52 def find_external_with_some_role(role_ids) all_external_with_some_role(role_ids).first end
with_all_roles(role_ids)
click to toggle source
# File lib/auth_lh/user_management.rb, line 68 def with_all_roles(role_ids) all.to_a.find_all { |x| x.has_all_roles?(role_ids) } end
with_role(role_id)
click to toggle source
# File lib/auth_lh/user_management.rb, line 60 def with_role(role_id) all.to_a.find_all { |x| x.has_role?(role_id) } end
with_some_role(role_ids)
click to toggle source
# File lib/auth_lh/user_management.rb, line 64 def with_some_role(role_ids) all.to_a.find_all { |x| x.has_some_role?(role_ids) } end