fix: allow admin role to access triage and investigation pages

Role guard was hse-only — admin was redirected to inbox on click.
Both triage and investigation now accept hse or admin.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CPf5Rc8QPx6V8KLEEgfKEQ
This commit is contained in:
2026-07-13 10:00:17 +08:00
co-authored by Claude Sonnet 4.6
parent 8a9416abb9
commit e9fd29035a
2 changed files with 2 additions and 2 deletions
@@ -18,7 +18,7 @@ export default async function TriagePage({ params }: Props) {
const { data: profile } = await supabase
.from('users').select('role').eq('id', data.user.id).single()
if (!profile || profile.role !== 'hse') redirect('/hse/incidents')
if (!profile || !['hse', 'admin'].includes(profile.role)) redirect('/hse/incidents')
const { data: incident } = await supabase
.from('incidents')