Topic: Confused with Roles
I am trying to develop a store application to use with my business. this is my first rails application (other than the blog and tweet apps i created for practice while learning online).
First i would like to explain what i am trying to achieve and later will explain where i am stuck.
I am a office stationary vendor. I have various clients as organizations who purchase from me. I want to give an online tool for them to place orders, view their existing/historical orders, pull their weekly/monthly/annual invoice.
Few important points to understand. These organizations have various departments. orders will be placed by these departments.
Users placing order should be able to able to review his orders only
Dept head should be able to to access all the orders placed by users in his department.
Finance and Procurement department should be able to view orders from the entire organization.
Me and My Assistant should be able to see all orders placed by all organizations.
One dept head should not be able to view the other dept's order. Nor. one organization should be able to view the others orders/invoice...
Now I am confused in :-
1. how to define/assign roles
2. I can create order history on basis of current_user helper method.. but i am confused in how to pull order history on basis of departments and organization.
Please provide your views...
Thanks in Advance for the help
P.S. I have time but not money... ppl who wish to contact me on selling their skill for money - No thanks, I cannot afford.