rolesForEndpoint
@mineflow/api-schemas / rolesForEndpoint
Function: rolesForEndpoint()
function rolesForEndpoint(method: string, path: string): readonly SystemRole[];
Defined in: packages/api-schemas/src/index.ts:76
Роли с доступом к эндпоинту (@RequiresRole). Пустой массив, если эндпоинт не
найден или @Public. Канонический способ гейтить UI-действие по тому же
контракту, что enforce'ит бэк.
Parameters
| Parameter | Type |
|---|---|
method | string |
path | string |
Returns
readonly SystemRole[]