Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/verse/json_rpc/exposition/extension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ def json_rpc(
end

define_method(base_method) do
# the outer, request-level auth-checked
# gate is redundant for JSON-RPC — real per-action authorization is already
# enforced independently by each method's own repository call
# (scoped()/can!). The outer gate should stop trying to infer "was auth
# checked" from whether any item happened to reach business logic, and instead
# just be marked satisfied up front for JSON-RPC requests, since the inner,
# per-item mechanism is what's actually doing the enforcement.
auth_context.mark_as_checked!
self.class.__json_rpc_controller__.handle(self, batch_failure:)
end

Expand Down