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, last_name: str, preferred_name: str, email: str, expiration_ymd: str, authorizations: List[str], oops_override: bool = False)¶
Bases:
objectClass representing one user.
- property as_dict: Dict[str, Any]¶
Return a dict representation of this user.
- class dm_mac.models.users.UsersConfig¶
Bases:
objectClass representing users configuration file.
- _get_config_path() str¶
Get the path to the users config 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.