I'm building a new project with backbone and I was wondering what is the best approach to handle user's permissions with it. e.g. if I want that for some users a specific control will not be rendered. where the logic for it should be? I was thinking maybe checking this on the initialize function of the View and wrapping the render function with it. what would you do?
I would refer you to Addy Osmany's Large Scale Javascript paper. He describes the idea of Facade
which is also responsible for handling permissions.
The aura project intended to apply this concept, but for now the permissions feature is missing there, as for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With