- Integrate webhook alerts for admin login lockouts. - Implement detailed audit logging for login, logout, and setup actions. - Improve client revocation event tracking. - Standardize error handling in profile updates. - Enforce 'operator' role for event API access.
26 lines
621 B
TypeScript
26 lines
621 B
TypeScript
'use client';
|
|
|
|
import { MainLayout } from '@/components/layout/MainLayout';
|
|
import type { VconAdminRole } from '@/lib/vconUiHelpers';
|
|
import React, { createContext, useContext } from 'react';
|
|
|
|
const VconRoleContext = createContext<VconAdminRole>('owner');
|
|
|
|
export function useVconRole(): VconAdminRole {
|
|
return useContext(VconRoleContext);
|
|
}
|
|
|
|
export function VconShell({
|
|
role = 'owner',
|
|
children,
|
|
}: {
|
|
role?: VconAdminRole;
|
|
children: React.ReactNode;
|
|
}) {
|
|
return (
|
|
<VconRoleContext.Provider value={role}>
|
|
<MainLayout showSidebar={true}>{children}</MainLayout>
|
|
</VconRoleContext.Provider>
|
|
);
|
|
}
|