unified code verification service

This commit is contained in:
Stephan D
2026-02-10 01:55:33 +01:00
parent 76c3bfdea9
commit 7f540671c1
120 changed files with 1863 additions and 1394 deletions

View File

@@ -54,12 +54,12 @@ func GetAccountBoundObjects[T any](
if err != nil {
if !errors.Is(err, merrors.ErrNoData) {
logger.Warn("Failed to fetch account bound objects", zap.Error(err),
mzap.ObjRef("account_ref", accountRef),
mzap.AccRef(accountRef),
mzap.ObjRef("organization_ref", organizationRef),
)
} else {
logger.Debug("No matching account bound objects found", zap.Error(err),
mzap.ObjRef("account_ref", accountRef),
mzap.AccRef(accountRef),
mzap.ObjRef("organization_ref", organizationRef),
)
}
@@ -80,7 +80,7 @@ func GetAccountBoundObjects[T any](
logger.Debug("Successfully retrieved account bound objects",
zap.Int("total_count", len(allObjects)),
mzap.ObjRef("account_ref", accountRef),
mzap.AccRef(accountRef),
mzap.ObjRef("organization_ref", organizationRef),
zap.Any("objs", allObjects),
)

View File

@@ -29,17 +29,17 @@ func GetProtectedObjects[T any](
refs, err := repo.ListPermissionBound(ctx, repository.ApplyCursor(filter, cursor))
if err != nil {
if !errors.Is(err, merrors.ErrNoData) {
logger.Warn("Failed to fetch object IDs", zap.Error(err), mzap.ObjRef("account_ref", accountRef),
logger.Warn("Failed to fetch object IDs", zap.Error(err), mzap.AccRef(accountRef),
mzap.ObjRef("organization_ref", organizationRef), zap.String("action", string(action)))
} else {
logger.Debug("No matching IDs found", zap.Error(err), mzap.ObjRef("account_ref", accountRef),
logger.Debug("No matching IDs found", zap.Error(err), mzap.AccRef(accountRef),
mzap.ObjRef("organization_ref", organizationRef), zap.String("action", string(action)))
}
return nil, err
}
res, err := enforcer.EnforceBatch(ctx, refs, accountRef, action)
if err != nil {
logger.Warn("Failed to enforce object IDs", zap.Error(err), mzap.ObjRef("account_ref", accountRef),
logger.Warn("Failed to enforce object IDs", zap.Error(err), mzap.AccRef(accountRef),
mzap.ObjRef("organization_ref", organizationRef), zap.String("action", string(action)))
return nil, err
}