saleor/graphql/utils.py
def format_permissions_for_display(permissions):
    """Transform permissions queryset into PermissionDisplay list.

    Keyword arguments:
    permissions - queryset with permissions
    """
    formatted_permissions = []
    for permission in permissions:
        codename = '.'.join(
            [permission.content_type.app_label, permission.codename])
        formatted_permissions.append(
            PermissionDisplay(
                code=PermissionEnum.get(codename),
                name=permission.name))
    return formatted_permissions
Transform permissions queryset into PermissionDisplay list.

    Keyword arguments:
    permissions - queryset with permissions
    
Transform permissions queryset into PermissionDisplay list.
Keyword arguments:
permissions - queryset with permissions
Transform permissions queryset into PermissionDisplay list . Keyword arguments : permissions - queryset with permissions
def format_permissions_for_display(permissions):
    formatted_permissions = []
    for permission in permissions:
        codename = '.'.join(
            [permission.content_type.app_label, permission.codename])
        formatted_permissions.append(
            PermissionDisplay(
                code=PermissionEnum.get(codename),
                name=permission.name))
    return formatted_permissions
def format_permissions_for_display ( permissions ) : formatted_permissions = [ ] for permission in permissions : codename = '.' . join ( [ permission . content_type . app_label , permission . codename ] ) formatted_permissions . append ( PermissionDisplay ( code = PermissionEnum . get ( codename ) , name = permission . name ) ) return formatted_permissions
Transform permissions queryset into PermissionDisplay list.
Transform permissions queryset into PermissionDisplay list .
"""Transform permissions queryset into PermissionDisplay list.

    Keyword arguments:
    permissions - queryset with permissions
    """
permissions