Spaces:
Running

axeronis commited on
Commit
bba23a5
·
1 Parent(s): ab96df2

feat: manager can access appointments and notifications, analytics plan created

Browse files
Files changed (1) hide show
  1. frontend/lib/permissions.ts +5 -1
frontend/lib/permissions.ts CHANGED
@@ -15,10 +15,14 @@ export function hasAccess(userRole: UserRole | undefined, section: string): bool
15
  // OWNER имеет доступ ко всему
16
  if (userRole === 'OWNER') return true
17
 
18
- // MANAGER имеет доступ только к чатам
19
  const managerAllowedSections = [
20
  '/chats',
21
  '/chat/', // для отдельных чатов
 
 
 
 
22
  ]
23
 
24
  return managerAllowedSections.some(allowed => section.startsWith(allowed))
 
15
  // OWNER имеет доступ ко всему
16
  if (userRole === 'OWNER') return true
17
 
18
+ // MANAGER имеет доступ к чатам, записям и уведомлениям
19
  const managerAllowedSections = [
20
  '/chats',
21
  '/chat/', // для отдельных чатов
22
+ '/appointments', // записи/бронирования
23
+ '/records', // альтернативный путь записей
24
+ '/settings/notifications', // уведомления
25
+ '/notifications', // альтернативный путь
26
  ]
27
 
28
  return managerAllowedSections.some(allowed => section.startsWith(allowed))