Adding working get_allowed_users function.