The authority in OA can be set by one person in the post authority table structure of multi-departments

  mysql, question


Xiao Li is the general manager of company a, the deputy general manager of company b, the director of r&d center of company b, and the manager of a department of public relations center of company b.

A person may hold multiple positions in multiple departments of multiple companies. How can such authority and association be properly set?

  1. Functional departments and positions do not set up natural relationships. For example, if the manager’s power is greater than the deputy’s, this assumption is not set up.

  2. Set the permission table separately. This is a parallel structure and does not set the up-down level relationship between permissions. Can be grouped

  3. Set up permission group table or role table, only keep basic information.

  4. Setting Association between Permission Groups or Role Information and Permissions-What kind of parallel permissions does a user group have

  5. Staff table

  6. Company department table, tree structure

  7. Company Job Table, Tree Structure

  8. The 1-to-many relationship between company positions and permission groups, that is, the default permission group for a position, can be associated with multiple

  9. Employees are associated with departments and positions, multiple positions, multiple functions,

  10. The relationship between employees and permission groups, that is, an employee can have permissions other than those of his position, can consider setting a validity period.
    At this point, starting from an employee, one can know which department he works for, what position he holds, and what permissions he has-the union of the permission sets corresponding to the position he holds.