I have created a custom plugin (block) which lets me create anew hierarchy that consists of various departments, sections for those departments and areas for those sections.
Departments being the top most in the hierarchy and areas being the lower most where in all the members (or students) would go in.
Now I would like to put my users in to these hierarchies and set certain permissions based on their hierarchy.
Say I would like to have users as two types member and head, i.e. a user can either be a member of a certain area/section/department or he/she can be the head of that area/section/department.
N based on their type they'll have certain permissions. I would then want to use these permissions later in my other plugin which would let them view certain reports based on those permissions.
So what would be the best way to start doing this? Should I have an extra table in the database to store this kind of relation of a user and his hierarchy?
Should I create a space some where in the Admin so that an admin can have a list of users and assign them their hierarchy and permissions?
How can I achieve this? Any ideas or suggestions are welcomed.