title: MVC User Multi-Level Hierarchy and Dynamic Role Assignment
body: <p>I am new to MVC, but I have a good experience in C# Winforms, Database Designing and normalization.
  I want to define a User and his roles dynamically, using MVC.</p>
  <h1>Detailed Description</h1>
  <p>There is an Organization with the Head Of Department(HOD).
  There are several branch offices and each office have a Branch Head Officer Working under HOD.
  Each Branch Officer has a power to Assign Different Accessibility to his employees. <em>For Eg: A Cashier can also have an access to Generate Bills.</em></p>
  <h2>My Problems are:</h2>
  <ol>
  <li>HOD(Admin) Will Create A Branch Officer(BO).HOD Will Have Access To all the defined Actions in All the controller.</li>
  <li>How BO Can create a User that can have access only to the &quot;Controllers's Actions&quot; defined by the BO , and What If the Second Level User Want to create another third level user</li>
  <li>BO and his descendants will have access only to their Branch Office. They cannot see Any details of another Branch, but HOD can view any detail of any Branch. (I want this Authorization at Server Side to avoid Cross Site Scripts)</li>
  </ol>
  <p>Please guide Me, How Can I Implement This Model of Multi Access Level And Dynamic Role Management?</p>
  <p>I have searched a lot but Couldn't found anything that can help me. BTW This Project is Employee Management System that includes Payroll, Leave Management, Employee Service Book etc.
  Thanks in advance.</p>