dm_mac.models.users module
Models for users and tools for loading users config.
- class dm_mac.models.users.User(fob_codes: List[str], account_id: str, full_name: str, first_name: str, preferred_name: str, email: str, expiration_ymd: str, authorizations: List[str])
Bases:
object
Class representing one user.
- property as_dict: Dict[str, Any]
Return a dict representation of this user.
- class dm_mac.models.users.UsersConfig
Bases:
object
Class representing users configuration file.
- _load_and_validate_config() List[Dict[str, Any]]
Load and validate the config file.
- reload() Tuple[int, int, int]
Reload configuration from config file on disk.
Returns a 3-tuple of counts of users removed, updated, and added.
- static validate_config(config: List[Dict[str, Any]]) None
Validate configuration via jsonschema.