mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-06 17:47:01 +02:00
rpc: extend writePermissions and readPermissions with the invoice entity
In the prior commit, we added a new set of permissions and also a new entity: “invoices”. We’ll add this set of entities to the read and write permissions accordingly as well to ensure that the existing macaroons have access to all the items that the invoice.macaroon does.
This commit is contained in:
10
rpcserver.go
10
rpcserver.go
@@ -69,6 +69,10 @@ var (
|
||||
Entity: "info",
|
||||
Action: "read",
|
||||
},
|
||||
{
|
||||
Entity: "invoices",
|
||||
Action: "read",
|
||||
},
|
||||
}
|
||||
|
||||
// writePermissions is a slice of all entities that allow write
|
||||
@@ -98,6 +102,12 @@ var (
|
||||
Entity: "info",
|
||||
Action: "write",
|
||||
},
|
||||
{
|
||||
Entity: "invoices",
|
||||
Action: "write",
|
||||
},
|
||||
}
|
||||
|
||||
// invoicePermissions is a slice of all the entities that allows a user
|
||||
// to only access calls that are related to invoices, so: streaming
|
||||
// RPC's, generating, and listening invoices.
|
||||
|
Reference in New Issue
Block a user