title: Role based web UI with REST
body: <p>We have chosen a REST based architecture for a new web based application. The entire platform is exposed in the form of a RESTful service so that any UI (WEB/Mobile) can be built on top of these. So, the application is in 3 layers, the DB, the Application layer - this just exposes RESTful services, and UI - currently a HTML5/CSS/Javascript based UI consuming web services. </p>
  
  <p>This application also has role based access and hence the UI has to be designed based on the role. Is it a good idea for a web service to return the set of privileges in a service response and then use it in Javascript to build the UI?</p>
  
  <p>UI variations for roles can be as follows:<br>
  Main menu might change based on the role <br>
  Tabs have to controlled based on roles <br>
  Most of the pages in the application are widget based, and display of widgets is again tagged to roles <br></p>
  
  <p>Once again, I would like to know if this is a right idea to go ahead with. Please suggest.</p>