Add role base access control for events module
This commit is contained in:
13
src/app.d.ts
vendored
13
src/app.d.ts
vendored
@@ -1,17 +1,30 @@
|
||||
import type { Session, SupabaseClient, User } from '@supabase/supabase-js'
|
||||
import type { Database } from './database.types.ts' // import generated types
|
||||
|
||||
// Define the profile type based on the database schema
|
||||
type Profile = {
|
||||
display_name: string | null
|
||||
section_position: string | null
|
||||
section: {
|
||||
name: string | null
|
||||
} | null
|
||||
}
|
||||
|
||||
declare global {
|
||||
namespace App {
|
||||
// interface Error {}
|
||||
interface Locals {
|
||||
supabase: SupabaseClient<Database>
|
||||
safeGetSession: () => Promise<{ session: Session | null; user: User | null }>
|
||||
getUserProfile: (userId: string) => Promise<Profile | null>
|
||||
session: Session | null
|
||||
user: User | null
|
||||
profile: Profile | null
|
||||
}
|
||||
interface PageData {
|
||||
session: Session | null
|
||||
user: User | null
|
||||
profile: Profile | null
|
||||
}
|
||||
// interface PageState {}
|
||||
// interface Platform {}
|
||||
|
||||
Reference in New Issue
Block a user