def get_all_system_kvp_names_for_user(user):
    """
    Retrieve all the permission grants for a particular user.
    The result will return the key list

    :rtype: ``list``
    """
    key_list = []

    for uid in get_key_uids_for_user(user):
        pfx = "%s%s%s" % (
            ResourceType.KEY_VALUE_PAIR,
            DATASTORE_KEY_SEPARATOR,
            FULL_SYSTEM_SCOPE,
        )
        if not uid.startswith(pfx):
            continue

        key_name = uid.split(DATASTORE_KEY_SEPARATOR)[2:]

        if key_name and key_name not in key_list:
            key_list.append(USER_SEPARATOR.join(key_name))

    return sorted(key_list)

    Retrieve all the permission grants for a particular user.
    The result will return the key list

    :rtype: ``list``
    
st2common/st2common/services/keyvalues.py