From e46a345a0dbbc5ae4c952d00b130c687990c03f9 Mon Sep 17 00:00:00 2001 From: Turtle Date: Mon, 27 Sep 2021 16:10:20 -0500 Subject: [PATCH] Export AllPermissions slice for baking super macaroon in Lightning Terminal Export AllPermissions slice so that we can retrieve the permissions required to run Loop's operations. We need these permissions in Lightning Terminal in order to bake a super macaroon that allows access to Loop. --- loopd/macaroons.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/loopd/macaroons.go b/loopd/macaroons.go index f5a2036..1fdd247 100644 --- a/loopd/macaroons.go +++ b/loopd/macaroons.go @@ -105,11 +105,11 @@ var ( }}, } - // allPermissions is the list of all existing permissions that exist + // AllPermissions is the list of all existing permissions that exist // for loopd's RPC. The default macaroon that is created on startup // contains all these permissions and is therefore equivalent to lnd's // admin.macaroon but for loop. - allPermissions = []bakery.Op{{ + AllPermissions = []bakery.Op{{ Entity: "loop", Action: "out", }, { @@ -195,9 +195,9 @@ func (d *Daemon) startMacaroonService() error { // existing permissions (equivalent to the admin.macaroon in // lnd). Custom macaroons can be created through the bakery // RPC. Add our debug permissions if required. - allPermissions = append(allPermissions, debugPermissions...) + AllPermissions = append(AllPermissions, debugPermissions...) loopMac, err := d.macaroonService.Oven.NewMacaroon( - idCtx, bakery.LatestVersion, nil, allPermissions..., + idCtx, bakery.LatestVersion, nil, AllPermissions..., ) if err != nil { return err