refactor: extract the RPC guarded(permission, action) helper into @octant/authentication #51
Labels
No labels
bug
enhancement
pr-split
question
security
transaction-matcher
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
momsse/octant#51
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The
guarded(permission, action)helper —pipe(action, Policy.withPolicy(Policy.permission(permission)))— is now duplicated verbatim across RPC handler layers:packages/domain/authorization/src/interface-adapters/rpcs/authorization.rpc.layer.tspackages/domain/reconciliation/src/interface-adapters/rpcs/reconciliation.rpc.layer.tsEach new permission-guarded RPC group copies it again. Extract it once into
@octant/authentication(next toPolicy) and have every RPC layer import it.Surfaced in the #41 review (PR #114).