django_ftpserver.authorizers
- class django_ftpserver.authorizers.FTPAccountAuthorizer(file_access_user=None)
Authorizer class by django authentication.
- get_account(username)
return user by username.
- get_msg_login(username)
message for welcome.
- get_perms(username)
return user permissions
- has_perm(username, perm, path=None)
check user permission
- has_user(username)
return True if exists user.
- impersonate_user(username, password)
delegate to personate_user method
- model
alias of
FTPUserAccount
- terminate_impersonation(username)
delegate to terminate_impersonation method
- validate_authentication(username, password, handler)
authenticate user with password
- django_ftpserver.authorizers.ensure_db_connection(func)
Decorator to close old database connections before executing the function.
This prevents “MySQL server has gone away” errors in long-running FTP server processes by closing stale database connections before making new queries.