def acp_users_import():
    """Import users from a TSV file."""
    if not current_user.is_admin:
        return error("Not authorized to edit users.", 401)
    if not db:
        return error('The ACP is not available in single-user mode.', 500)

    form = UserImportForm()
    if not form.validate():
        return error("Bad Request", 400)
    fh = request.files['tsv'].stream
    tsv = fh.read()
    return tsv
def acp_users_import ( ) : if not current_user . is_admin : return error ( "Not authorized to edit users." , 401 ) if not db : return error ( 'The ACP is not available in single-user mode.' , 500 ) form = UserImportForm ( ) if not form . validate ( ) : return error ( "Bad Request" , 400 ) fh = request . files [ 'tsv' ] . stream tsv = fh . read ( ) return tsv
Import users from a TSV file.