Files
iistwin/server/gps/access.ts

14 lines
634 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { hasModuleAccess, type ModuleAccessUser } from "../utils/module-access";
/**
* Контроль доступа к GPS-вкладке.
*
* Правило: users.gps_access OR любая организационная роль пользователя
* с gps_access OR appRole = 'admin' (см. utils/module-access).
* Раньше использовались gps_settings.allowed_user_ids/allowed_role_ids —
* колонки остались в БД, но больше не читаются.
*/
export async function hasGpsAccess(user: ModuleAccessUser): Promise<boolean> {
return hasModuleAccess(user, "gps");
}