Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

handle permissions with backbone

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?

like image 873
Tsahi Avatar asked Nov 12 '22 09:11

Tsahi


1 Answers

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.

like image 119
Alexander Beletsky Avatar answered Nov 15 '22 07:11

Alexander Beletsky