feat: allow verwalter role to act as admin in wizard
This commit is contained in:
@@ -36,7 +36,7 @@ export async function POST(request: Request) {
|
||||
.eq('id', user.id)
|
||||
.single();
|
||||
|
||||
const isAdminUser = dbUser?.role === 'admin';
|
||||
const isAdminUser = dbUser?.role === 'admin' || dbUser?.role === 'verwaltung';
|
||||
if (!isAdminUser && !dbUser?.company_id) {
|
||||
return NextResponse.json({ error: 'Firma erforderlich' }, { status: 403 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user