diff --git a/backend/src/routes/chat.ts b/backend/src/routes/chat.ts index 2b445d8..592aab6 100644 --- a/backend/src/routes/chat.ts +++ b/backend/src/routes/chat.ts @@ -417,7 +417,7 @@ const chatRoutes: FastifyPluginAsync = async (fastify) => { // Transfer ownership (only current owner or admin can do this) if (transferOwnerTo) { const userId = request.user.sub - if (createdBy !== userId && request.user.role !== 'admin') { + if (createdBy !== userId && request.user.role !== 'super_admin') { return reply.code(403).send({ error: 'Only the group creator can transfer ownership' }) } await db.query('UPDATE chat_rooms SET created_by = $1 WHERE id = $2', [transferOwnerTo, roomId])