mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-03-30 15:08:28 +00:00
Merge pull request #1193 from TryQuiet/fix-access-controllers
await verifyIdentity because it's async
This commit is contained in:
commit
b6c03fac00
@ -84,7 +84,7 @@ const IPFSAccessController = ({ write, storage } = {}) => async ({ orbitdb, iden
|
||||
// Allow if the write access list contain the writer's id or is '*'
|
||||
if (write.includes(id) || write.includes('*')) {
|
||||
// Check that the identity is valid
|
||||
return identities.verifyIdentity(writerIdentity)
|
||||
return await identities.verifyIdentity(writerIdentity)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ const OrbitDBAccessController = ({ write } = {}) => async ({ orbitdb, identities
|
||||
// If the ACL contains the writer's public key or it contains '*'
|
||||
const hasWriteAccess = await hasCapability('write', id) || await hasCapability('admin', id)
|
||||
if (hasWriteAccess) {
|
||||
return identities.verifyIdentity(writerIdentity)
|
||||
return await identities.verifyIdentity(writerIdentity)
|
||||
}
|
||||
|
||||
return false
|
||||
|
Loading…
x
Reference in New Issue
Block a user