assets_guardian.plugins.dolibarr.repositoryο
Classes
|
Repository to access raw data from the Dolibarr REST API. |
- class assets_guardian.plugins.dolibarr.repository.DolibarrRepository(client: HttpClient)[source]ο
Bases:
objectRepository to access raw data from the Dolibarr REST API.
The Dolibarr API returns lists of users and groups as JSON lists. User details and a userβs groups require separate calls (N+1).
- get_raw_accesses() list[dict[str, Any]][source]ο
Not used: Dolibarr accesses are built per user in the collector.
- Returns:
Empty list (ARCH-LIMIT, see DolibarrCollector).
- Return type:
list[dict[str, Any]]
- get_raw_assets() list[dict[str, Any]][source]ο
Returns groups as assets (IRepository implementation).
- Returns:
List of raw groups.
- Return type:
list[dict[str, Any]]
- get_raw_groups() list[dict[str, Any]][source]ο
Retrieves all Dolibarr groups.
- Returns:
List of raw groups, empty on error.
- Return type:
list[dict[str, Any]]
- get_raw_user_details(user_id: int | str) dict[str, Any][source]ο
Retrieves details of a user with their permissions.
- Parameters:
user_id β Userβs Dolibarr identifier.
- Returns:
Detailed user data (with
permissions), empty on error.- Return type:
dict[str, Any]