feat(security): обновление системы безопасности GraphQL и исправления ESLint
- Обновлены тесты безопасности для всех ролей (SELLER, WHOLESALE, FULFILLMENT, LOGIST) - Улучшен мониторинг и аудит доступа к коммерческим данным - Добавлена интеграция с внешними системами мониторинга - Исправлены ESLint предупреждения в компонентах поставщика - Обновлены middleware для безопасности GraphQL резолверов 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -24,7 +24,7 @@ function createSecureContextWithOrgData(context: Context, currentUser: any) {
|
||||
...context.user,
|
||||
organizationType: currentUser.organization.type,
|
||||
organizationId: currentUser.organization.id,
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
import { ParticipantIsolation } from './security/participant-isolation'
|
||||
@ -7287,7 +7287,7 @@ export const resolvers = {
|
||||
updateSupplyParameters: async (
|
||||
_: unknown,
|
||||
args: { id: string; volume?: number; packagesCount?: number },
|
||||
context: GraphQLContext
|
||||
context: GraphQLContext,
|
||||
) => {
|
||||
try {
|
||||
// Проверка аутентификации
|
||||
@ -7301,7 +7301,7 @@ export const resolvers = {
|
||||
// Найти поставку и проверить права доступа
|
||||
const supply = await prisma.supplyOrder.findUnique({
|
||||
where: { id: args.id },
|
||||
include: { partner: true }
|
||||
include: { partner: true },
|
||||
})
|
||||
|
||||
if (!supply) {
|
||||
@ -7623,7 +7623,7 @@ export const resolvers = {
|
||||
},
|
||||
})
|
||||
|
||||
console.warn(`[DEBUG] updatedOrder structure:`, {
|
||||
console.warn('[DEBUG] updatedOrder structure:', {
|
||||
id: updatedOrder.id,
|
||||
itemsCount: updatedOrder.items?.length || 0,
|
||||
firstItem: updatedOrder.items?.[0] ? {
|
||||
@ -7640,7 +7640,7 @@ export const resolvers = {
|
||||
const filteredOrder = SupplyDataFilter.filterSupplyOrder(updatedOrder, securityContextWithOrgType)
|
||||
|
||||
console.warn(`[DEBUG] Заказ ${args.id} успешно обновлен до статуса: ${updatedOrder.status}`)
|
||||
console.warn(`[DEBUG] filteredOrder:`, {
|
||||
console.warn('[DEBUG] filteredOrder:', {
|
||||
hasData: !!filteredOrder.data,
|
||||
dataId: filteredOrder.data?.id,
|
||||
dataKeys: Object.keys(filteredOrder.data || {}),
|
||||
|
Reference in New Issue
Block a user