Grant a capability to an identity.
If the identity has no entry, one is created with default caps plus the granted cap. Returns a new AclState — the original is not modified.
Current ACL state
Napplet identity
Capability bit constant to grant (e.g., CAP_RELAY_READ)
New AclState with the capability granted
const state2 = grant(state, id, CAP_RELAY_READ);check(state2, id, CAP_RELAY_READ); // true Copy
const state2 = grant(state, id, CAP_RELAY_READ);check(state2, id, CAP_RELAY_READ); // true
Grant a capability to an identity.
If the identity has no entry, one is created with default caps plus the granted cap. Returns a new AclState — the original is not modified.