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:
parent
6c6285344b
commit
6a294e7489
10
rpcserver.go
10
rpcserver.go
@ -69,6 +69,10 @@ var (
|
|||||||
Entity: "info",
|
Entity: "info",
|
||||||
Action: "read",
|
Action: "read",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Entity: "invoices",
|
||||||
|
Action: "read",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
// writePermissions is a slice of all entities that allow write
|
// writePermissions is a slice of all entities that allow write
|
||||||
@ -98,6 +102,12 @@ var (
|
|||||||
Entity: "info",
|
Entity: "info",
|
||||||
Action: "write",
|
Action: "write",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Entity: "invoices",
|
||||||
|
Action: "write",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
// invoicePermissions is a slice of all the entities that allows a user
|
// invoicePermissions is a slice of all the entities that allows a user
|
||||||
// to only access calls that are related to invoices, so: streaming
|
// to only access calls that are related to invoices, so: streaming
|
||||||
// RPC's, generating, and listening invoices.
|
// RPC's, generating, and listening invoices.
|
||||||
|
Loading…
Reference in New Issue
Block a user