Groups are one way of acheiving this issue but what i thinki is this.
In PQA, we already have user roles which are;
We can expand and abstract existing user roles in this way.
If after company A buys PQA and installs it,
The site Admin then navigate Admin --> Users --> User Role
Now there are two types of main PQA users
Site Administrators --> These are the IT people in a company that will install PQA and manage it
Company Managers ---> These are the leaders in a company that manages the company.
We can then design PQA user roles as follows;
1. Site Admin
Role = Current site admin
2. Site Moderator
Role = Current site Moderator
3. Company Leader A (CEO)
Role = Role Assigned by Site Admin
4 . Section Leader B
Role = Assign leader to Category A or department A
5. Ability to change default user (Registered User) to any name example (Employee)
6. Ability to change the category to any name example Department, Sections etc
By this design, Every one regsiters as default user and roles are assigned afterwards.
Now who sees what?
There is a plugin called expert questions by NOAHY
We can extend this plugin and add ability to change category to any name example in a company, we can have category name changed to departments.
if user A belongs to category or department A,
after logging in, only show threads from category or department A.
if user B is leader of department A, give user A moderator buttons and all threads from department A or category A
If user C = CEO or Manager etc, allow him/her access to all categories
Show all threads from Department or Section Managers.
How to automatically assign users to sections or departments?
Add new field in registration form (optional and turned off by default since some communities will not need it)
If user A is assinged to category or department A,
return all searches from department A for all keywords
so the first query to run in a search is type of user category or department.
I hope my idea is clear?