This commit is contained in:
2025-05-11 10:01:23 +02:00
parent e9dc7c1192
commit 1dfb1a2efa
25 changed files with 231 additions and 94 deletions

View File

@@ -9,7 +9,7 @@ from utils.database.connection import connetti_db
logger = logging.getLogger(__name__)
def ftp_SITE_ADDU(self, line):
def ftp_SITE_ADDU(self: object, line: str) -> None:
"""Adds a virtual user, creates their directory, and saves their details to the database.
"""
cfg = self.cfg
@@ -50,7 +50,7 @@ def ftp_SITE_ADDU(self, line):
self.respond(f'501 SITE ADDU failed: {e}.')
print(e)
def ftp_SITE_DISU(self, line):
def ftp_SITE_DISU(self: object, line: str) -> None:
"""Removes a virtual user from the authorizer and marks them as deleted in the database."""
cfg = self.cfg
parms = line.split()
@@ -77,7 +77,7 @@ def ftp_SITE_DISU(self, line):
self.respond('501 SITE DISU failed.')
print(e)
def ftp_SITE_ENAU(self, line):
def ftp_SITE_ENAU(self: object, line: str) -> None:
"""Restores a virtual user by updating their status in the database and adding them back to the authorizer."""
cfg = self.cfg
parms = line.split()
@@ -116,7 +116,7 @@ def ftp_SITE_ENAU(self, line):
self.respond('501 SITE ENAU failed.')
print(e)
def ftp_SITE_LSTU(self, line):
def ftp_SITE_LSTU(self: object, line: str) -> None:
"""Lists all virtual users from the database."""
cfg = self.cfg
users_list = []