Skip to content

Commit 768fc0b

Browse files
committed
fix(plugin-sharing): keep the logger's receiver on the declaration-over-row report
Claude-Session: https://claude.ai/code/session_01MaH9HpfmNnJGzgWQPqNmhP Co-authored-by: Claude <noreply@anthropic.com>
1 parent 75bcef5 commit 768fc0b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎packages/plugins/plugin-sharing/src/sharing-rule-service.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,8 +1052,9 @@ export class SharingRuleService implements ISharingRuleService {
10521052
'while the row keeps answering as its own rule. Remedy: rename the stored rule, which makes it a clone of its ' +
10531053
`own, and switch the declared rule off (POST /api/v1/security/_activation/sharing_rule/${rule.name} with ` +
10541054
'{ "enabled": false }) if it must not grant.';
1055-
const log = this.logger?.error ?? this.logger?.warn;
1056-
log?.call(this.logger, message, { rule: rule.name, organization: scope });
1055+
const meta = { rule: rule.name, organization: scope };
1056+
if (this.logger?.error) this.logger.error(message, meta);
1057+
else this.logger?.warn?.(message, meta);
10571058
}
10581059

10591060
/**

0 commit comments

Comments
 (0)