Skip to content
Snippets Groups Projects
Commit 1408b5d0 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[enh] Sandbox: also missing the `from` case

parent 04d22756
Branches
Tags
3 merge requests!1220Stable/ws2p v1.1 trymerge,!1208Stable/ws2p v1.1,!1154Typage
export interface DBDocument {
pubkey?: string
issuer?: string
issuers?: string[]
pubkey?: string // idty table
from?: string // cert table
issuer?: string // membership table
issuers?: string[] // txs table
}
\ No newline at end of file
......@@ -13,7 +13,9 @@ export class SandBox<T extends DBDocument> {
}
async acceptNewSandBoxEntry(element:T, pubkey:string) {
// Accept any document which has the exception pubkey (= the node pubkey)
if (element.pubkey === pubkey
|| element.from === pubkey
|| element.issuer === pubkey
|| (element.issuers !== undefined && element.issuers.indexOf(pubkey) !== -1)) {
return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment