dchester / epilogue

Create flexible REST endpoints and controllers from Sequelize models in your Express app
846 stars 116 forks source link

How to make some fields read-only. #129

Closed luckypur closed 8 years ago

luckypur commented 8 years ago

excludeAttribute dose not works with Post request. Like suppose there is 'isSuperuser' field in user table which should not be open to change through any Post request. I understand that we can do it with milestones and hooks but a simple list field(readOnlyAttribute) in resource config would be great.

mbroadst commented 8 years ago

@luckypur this would be incredibly easy to add to the create controller (in fact there are two other places in the controller where excludeAttributes are used already). If you submitted a fix with a test I would gladly accept it, thanks for your interest!

luckypur commented 8 years ago

@mbroadst please check the PR #131