mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 09:11:13 -05:00
Implement RLS and security functions
Apply Row Level Security to orphaned_images and system_alerts tables. Create RLS policies for admin/moderator access. Replace system_health view with get_system_health() function.
This commit is contained in:
@@ -5989,15 +5989,6 @@ export type Database = {
|
||||
}
|
||||
Relationships: []
|
||||
}
|
||||
system_health: {
|
||||
Row: {
|
||||
alerts_last_24h: number | null
|
||||
checked_at: string | null
|
||||
critical_alerts_count: number | null
|
||||
orphaned_images_count: number | null
|
||||
}
|
||||
Relationships: []
|
||||
}
|
||||
}
|
||||
Functions: {
|
||||
anonymize_user_submissions: {
|
||||
@@ -6221,6 +6212,15 @@ export type Database = {
|
||||
updated_at: string
|
||||
}[]
|
||||
}
|
||||
get_system_health: {
|
||||
Args: never
|
||||
Returns: {
|
||||
alerts_last_24h: number
|
||||
checked_at: string
|
||||
critical_alerts_count: number
|
||||
orphaned_images_count: number
|
||||
}[]
|
||||
}
|
||||
get_user_management_permissions: {
|
||||
Args: { _user_id: string }
|
||||
Returns: Json
|
||||
|
||||
Reference in New Issue
Block a user