From 061040c57b6d61f3d6b9b0af15ec068007a619e8 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Thu, 10 Sep 2020 10:25:38 +0200 Subject: [PATCH] rpcserver: export MainRPCServerPermissions To be able to properly delegate requests to the correct component in LiT we need to know all URIs of lnd and the other subservers. --- rpcserver.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rpcserver.go b/rpcserver.go index 784179f4..fde2d3b8 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -213,9 +213,9 @@ func stringInSlice(a string, slice []string) bool { return false } -// mainRPCServerPermissions returns a mapping of the main RPC server calls to +// MainRPCServerPermissions returns a mapping of the main RPC server calls to // the permissions they require. -func mainRPCServerPermissions() map[string][]bakery.Op { +func MainRPCServerPermissions() map[string][]bakery.Op { return map[string][]bakery.Op{ "/lnrpc.Lightning/SendCoins": {{ Entity: "onchain", @@ -640,7 +640,7 @@ func newRPCServer(cfg *Config, s *server, macService *macaroons.Service, // Next, we need to merge the set of sub server macaroon permissions // with the main RPC server permissions so we can unite them under a // single set of interceptors. - permissions := mainRPCServerPermissions() + permissions := MainRPCServerPermissions() for _, subServerPerm := range subServerPerms { for method, ops := range subServerPerm { // For each new method:ops combo, we also ensure that