mysql - OA中的权限一人任多部门的岗位 权限表结构设置
大家讲道理
大家讲道理 2017-04-17 13:23:36
0
3
897

公司-》部门-》岗位

小李是A公司总经理 兼任B公司的副总经理 兼任B公司的研发中心总监 兼任B公司的公关中心 某部门的 经理

一个人可能身兼多个公司的多个部门的的多个岗位,这样的权限和关联怎么设置对合理

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(3)
左手右手慢动作
  1. There is no natural relationship between functional departments and positions. For example, the manager must have greater power than the deputy. This assumption is not set

  2. Set the permission table separately. This is a parallel structure and does not set the upper and lower level relationships between permissions. Can be grouped

  3. Set a permission group table or role table, keeping only basic information

  4. Set the relationship between permission groups or role information and permissions - "What kind of parallel permissions does a user group have?

  5. Employee List

  6. Company department table, tree structure

  7. Company position list, tree structure

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

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

  10. The relationship between employees and permission groups, that is, an employee can have permissions beyond the permissions of his position. You can consider setting a validity period
    At this point, starting from an employee, you can know who he works for Which department, what position is held, what permissions are shared - the union of the permission sets corresponding to the positions held

Peter_Zhu

A user can only belong to one department, but can hold multiple positions at the same time.
Users, departments, positions or roles, and user groups can all be assignees. Resources are associated with assignees, and priorities are set between various assignees. When there are high-priority assignee permission records, low-priority records are ignored.
In addition, subordinate departments can inherit the authority of the superior department, but subordinate positions cannot inherit the authority of the superior position. Priority must also be considered for this.

Ty80

General Manager->Director->Part Manager This is a very typical tree structure

Position table: id (position id) parent_id (parent id of the position)
Employee table: id (employee id) job_id (owned position id) 1 to many

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!