assets_guardian.plugins.dolibarr.constantsο
Functions
|
Resolves the human-readable label of a Dolibarr permission key. |
- assets_guardian.plugins.dolibarr.constants.get_permission_label(module: str, permission_key: str) str[source]ο
Resolves the human-readable label of a Dolibarr permission key.
Traverses
DOLIBARR_PERMISSIONS_LABELSfollowing themodulepath (e.g.,"user.user"-> sub-dictuser-> sub-dictuser), then falls back to the base module if the full path is not found.- Parameters:
module β Name of the Dolibarr module, possibly nested (e.g.,
"user.self").permission_key β Permission key (e.g.,
"lire","creer").
- Returns:
Permission label, or
"{module}.{permission_key}"if not found.- Return type:
str