fix(xo.importConfig): correctly import ACLs

Fixes vatesfr/xo-web#1722
This commit is contained in:
Julien Fontanet 2016-11-04 09:40:41 +01:00
parent 5870769e7d
commit 5e785266a5

View File

@ -27,10 +27,8 @@ export default class {
xo.on('start', () => {
xo.addConfigManager('acls',
() => this.getAllAcls(),
acls => Promise.all(mapToArray(acls, acl =>
this.addAcl(acl.subjectId, acl.objectId, acl.action)
))
() => aclsDb.get(),
acls => aclsDb.update(acls)
)
})