Open ArnaudD opened 7 years ago
So I was about to open the exact same PR, this would be a wonderful enhancement. Any chance this could get traction?
We need to pass in an auth token from the initial call handled by epilogue, down through to the sequelize hooks to make some external calls and notify other systems of the changes (using that same auth token)
Hi,
We've been running with this fork for a year and though that this might interest someone.
We've added an attribute (
sequelizeOptions
) to epilogue context to specify options to sequelizefind
,create
,update
ordestroy
methods.This is useful for enforcing attribute/model access control with sequelize hooks (with something that looks like ssacl-attribute-roles), or to easily dispatch "changes" somewhere else :
In epilogue resources declaration:
In sequelize initialization:
What do you think ?
Thanks for epilogue !