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.
This commit is contained in:
parent
8988a01d7e
commit
061040c57b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user