forked from Hay1tsme/artemis
diva: added all previous commits, added username and password change
- Changed `update_profile()` function to allow a single Dict instead of multiple values - Added `passwd*` Columns to profile table and added corresponding update/rollback sql scripts - Added `handle_card_procedure_request()`, `handle_change_name_request ()` and `handle_change_passwd_request()` functions to DivaBase
This commit is contained in:
@ -1,17 +1,33 @@
|
||||
from core.config import CoreConfig
|
||||
|
||||
|
||||
class DivaServerConfig():
|
||||
def __init__(self, parent_config: "DivaConfig") -> None:
|
||||
self.__config = parent_config
|
||||
|
||||
|
||||
@property
|
||||
def enable(self) -> bool:
|
||||
return CoreConfig.get_config_field(self.__config, 'diva', 'server', 'enable', default=True)
|
||||
|
||||
|
||||
@property
|
||||
def loglevel(self) -> int:
|
||||
return CoreConfig.str_to_loglevel(CoreConfig.get_config_field(self.__config, 'diva', 'server', 'loglevel', default="info"))
|
||||
|
||||
|
||||
class DivaModsConfig():
|
||||
def __init__(self, parent_config: "DivaConfig") -> None:
|
||||
self.__config = parent_config
|
||||
|
||||
@property
|
||||
def unlock_all_modules(self) -> bool:
|
||||
return CoreConfig.get_config_field(self.__config, 'diva', 'mods', 'unlock_all_modules', default=True)
|
||||
|
||||
@property
|
||||
def unlock_all_items(self) -> bool:
|
||||
return CoreConfig.get_config_field(self.__config, 'diva', 'mods', 'unlock_all_items', default=True)
|
||||
|
||||
|
||||
class DivaConfig(dict):
|
||||
def __init__(self) -> None:
|
||||
self.server = DivaServerConfig(self)
|
||||
self.server = DivaServerConfig(self)
|
||||
self.mods = DivaModsConfig(self)
|
||||
|
Reference in New Issue
Block a user