parameters: (element, cls)
return_statement: return tuples
docstring: Get all available users mapped to all available project permissions.
docstring_summary: Get all available users mapped to all available project permissions.
docstring_tokens: Get all available users mapped to all available project permissions .
function: def get_element_permission_tuples(element, cls) -> List[Tuple[str,str]]:
      """Get all available users mapped to all available project permissions.
      """
      ctype = ContentType.objects.get_for_model(cls)
      permissions = Permission.objects.filter(content_type=ctype)
      elements = sorted(element.objects.all(), key=lambda x: x.get_name())
  
      tuples = []
      for e in elements:
          for p in permissions:
              pg_id = str(e.id) + "_" + str(p.id)
              pg_title = e.get_name() + " | " + p.name
              tuples.append( (pg_id, pg_title) )
  
      return tuples
function_tokens: def get_element_permission_tuples ( element , cls ) -> List [ Tuple [ str , str ] ] : ctype = ContentType . objects . get_for_model ( cls ) permissions = Permission . objects . filter ( content_type = ctype ) elements = sorted ( element . objects . all ( ) , key = lambda x : x . get_name ( ) ) tuples = [ ] for e in elements : for p in permissions : pg_id = str ( e . id ) + "_" + str ( p . id ) pg_title = e . get_name ( ) + " | " + p . name tuples . append ( ( pg_id , pg_title ) ) return tuples