unified code verification service
This commit is contained in:
@@ -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),
|
||||
)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user