a tool for shared writing and social publishing

add blocking functionality for administrators

+9 -1
+1 -1
app/[leaflet_id]/page.tsx
··· 34 .eq("id", props.params.leaflet_id) 35 .single(); 36 let rootEntity = res.data?.root_entity; 37 - if (!rootEntity || !res.data) 38 return ( 39 <div className="w-screen h-screen flex place-items-center bg-bg-leaflet"> 40 <div className="bg-bg-page mx-auto p-4 border border-border rounded-md flex flex-col text-center justify-centergap-1 w-fit">
··· 34 .eq("id", props.params.leaflet_id) 35 .single(); 36 let rootEntity = res.data?.root_entity; 37 + if (!rootEntity || !res.data || res.data.blocked_by_admin) 38 return ( 39 <div className="w-screen h-screen flex place-items-center bg-bg-leaflet"> 40 <div className="bg-bg-page mx-auto p-4 border border-border rounded-md flex flex-col text-center justify-centergap-1 w-fit">
+7
supabase/database.types.ts
··· 380 } 381 permission_tokens: { 382 Row: { 383 id: string 384 root_entity: string 385 } 386 Insert: { 387 id?: string 388 root_entity: string 389 } 390 Update: { 391 id?: string 392 root_entity?: string 393 } ··· 815 metadata: Json 816 updated_at: string 817 }[] 818 } 819 search: { 820 Args: {
··· 380 } 381 permission_tokens: { 382 Row: { 383 + blocked_by_admin: boolean | null 384 id: string 385 root_entity: string 386 } 387 Insert: { 388 + blocked_by_admin?: boolean | null 389 id?: string 390 root_entity: string 391 } 392 Update: { 393 + blocked_by_admin?: boolean | null 394 id?: string 395 root_entity?: string 396 } ··· 818 metadata: Json 819 updated_at: string 820 }[] 821 + } 822 + operation: { 823 + Args: Record<PropertyKey, never> 824 + Returns: string 825 } 826 search: { 827 Args: {
+1
supabase/migrations/20250219192237_add_blocked_by_admin_column_to_permission_tokens.sql
···
··· 1 + alter table "public"."permission_tokens" add column "blocked_by_admin" boolean;