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:
Olaoluwa Osuntokun 2018-03-20 16:42:15 -07:00
parent 6c6285344b
commit 6a294e7489
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

@ -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.