unified code verification service
This commit is contained in:
@@ -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