Closed lethak closed 6 years ago
Hi @lethak !
Thanks for reporting this.
This was caused by the Kuzzle initialization sequence, the repositories
were initialized after the plugin so when you try to use them you got an error.
Hello,
Thanks for the answer, in the meantime, wrapping rebuildRoles() in a setTimeout did the trick
Expected Behavior
createOrReplaceRole and createOrReplaceProfile should be working without throwing a TypeError
Current Behavior
A TypeError is thrown upon plugin initialization when kuzzle is starting
when using createOrReplaceRole:
when using createOrReplaceProfile:
Steps to Reproduce
I am calling rebuildRoles() on plugin init()
roles.json
Context (Environment)
Docker image: kuzzleio/kuzzle:1.3.1