You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
467 B

"""Маппинг роли HR → роль модуля тестов (порт `backend/src/utils/hrRoleMap.js`)."""
from __future__ import annotations
def map_hr_role_to_app(hr_role: str | None) -> str:
r = (hr_role or '').strip().lower()
if not r:
return 'employee'
if r == 'admin' or 'hr' in r or 'дире' in r:
return 'hr'
if 'manager' in r or 'рук' in r or 'завед' in r:
return 'manager'
return 'employee'