We are developing c#+ExtJs4 application. We want to separate the javascript and c# codes as we can, the js code can be some files which need to be cachable by the browser.
How can we send only the js codes what the user has rights? Eg if a user don't have right to a button, we don't want to see it in the client side code.
There are user groups, one user can be a part of one or more group. Group members can change in the application in runtime.
What we first think, we can put some specified comments into the javascript source, where a parser can skip the marked parts depends on the user rights. And in deploy time maybe we can generate as many versions as the rights levels combinations.