Get user by id doesn't work if user doesn't have enough rights because of the first 2 lines
def find_by_id(id) cached_user = find { |user| user.id == id } return cached_user if cached_user
as it calls the list_all_users in the all function, so if the user doesn't have sufficient rights to list all users, this fails.
Get user by id doesn't work if user doesn't have enough rights because of the first 2 lines
def find_by_id(id) cached_user = find { |user| user.id == id } return cached_user if cached_useras it calls the
list_all_usersin theallfunction, so if the user doesn't have sufficient rights to list all users, this fails.