#2888: Initialise ConfigSchema's and fix type names.

This commit is contained in:
Nick Todd
2024-12-12 14:58:48 +00:00
parent 2ecc142c28
commit 4a52054ed6
25 changed files with 59 additions and 47 deletions

View File

@@ -833,18 +833,18 @@ class UserManager(Service, identifier="UserManager"):
:param disabled_admins: A dictionary of currently disabled admin users by their usernames
"""
config: "UserManager.ConfigSchema"
config: "UserManager.ConfigSchema" = None
users: Dict[str, User] = {}
class ConfigSchema(Service.ConfigSchema):
"""ConfigSchema for UserManager."""
type: str = "USERMANAGER"
type: str = "USER_MANAGER"
def __init__(self, **kwargs):
"""
Initializes a UserManager instanc.
Initializes a UserManager instance.
:param username: The username for the default admin user
:param password: The password for the default admin user
@@ -1144,7 +1144,7 @@ class UserSessionManager(Service, identifier="UserSessionManager"):
This class handles authentication, session management, and session timeouts for users interacting with the Node.
"""
config: "UserSessionManager.ConfigSchema"
config: "UserSessionManager.ConfigSchema" = None
local_session: Optional[UserSession] = None
"""The current local user session, if any."""
@@ -1170,7 +1170,7 @@ class UserSessionManager(Service, identifier="UserSessionManager"):
class ConfigSchema(Service.ConfigSchema):
"""ConfigSchema for UserSessionManager."""
type: str = "USERSESSIONMANAGER"
type: str = "USER_SESSION_MANAGER"
def __init__(self, **kwargs):
"""