fix: Superhuman sync solo agencia — mensaje claro y botón oculto a cliente
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -20,7 +20,15 @@ async function requireAgency() {
|
||||
data: { user },
|
||||
} = await supabase.auth.getUser();
|
||||
if (!user || !isAgencyRole(userRole(user))) {
|
||||
return { error: NextResponse.json({ error: 'Forbidden' }, { status: 403 }) };
|
||||
return {
|
||||
error: NextResponse.json(
|
||||
{
|
||||
error:
|
||||
'Forbidden: sincronizar Superhuman requiere rol agencia (admin/team).',
|
||||
},
|
||||
{ status: 403 }
|
||||
),
|
||||
};
|
||||
}
|
||||
if (!superhumanConfigured()) {
|
||||
return {
|
||||
|
||||
@@ -74,6 +74,7 @@ export async function GET() {
|
||||
portfolioWide: false,
|
||||
tenantId,
|
||||
entries,
|
||||
isAgency: agency,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user