original_docstring: Return bool whether there is at least 1 user with role(s)
docstring: Return bool whether there is at least 1 user with role(s)
docstring_tokens: Return bool whether there is at least 1 user with role ( s )
code: def has_role(roles: Union[str, list]) -> bool:
      """Return bool whether there is at least 1 user with role(s)"""
      if type(roles) == str:
          roles = [roles]
      users = serverly.user.get_all()
      for u in users:
          for role in roles:
              if u.role == role or role in _role_hierarchy[u.role]:
                  return True
      return False
code_tokens: def has_role ( roles : Union [ str , list ] ) -> bool : if type ( roles ) == str : roles = [ roles ] users = serverly . user . get_all ( ) for u in users : for role in roles : if u . role == role or role in _role_hierarchy [ u . role ] : return True return False
short_docstring: Return bool whether there is at least 1 user with role(s)
short_docstring_tokens: Return bool whether there is at least 1 user with role ( s )
comment: """Return bool whether there is at least 1 user with role(s)"""