[PHP] simple idea database RBAC permissions and approval flow

Permissions: Functional authority + data rights
Control authority is access control interface menu buttons, the data is control data permission range
role (role)
-----------------
|id             |
-----------------
|name           |
-----------------

user (user)
-----------------
|id             |
-----------------
|name           |
-----------------

node (Node menu button)
-----------------
|id             |
-----------------
|name           |
-----------------
|module_name    |
-----------------
|action_name    |
-----------------
|pid            |
-----------------
|sort           |
----------------- 
user_role (user - roles table, functional competence)
 -----------------
|id             |
-----------------
|user_id        |
-----------------
|role_id        |
----------------- 
node_role (node - roles table, functional competence)
 -----------------
|id             |
-----------------
|role_id        |
-----------------
|node_id        |
-----------------

user_channel (User - channel table, the scope of rights data, many)
 -----------------
|id             |
-----------------
|user_id        |
-----------------
|channel_id     |
-----------------

flow (flow setting table, corresponding to the channel multi-level approval role, one to many)
-----------------
|id             |
-----------------
|channel_id     |
-----------------
|role_id        |
-----------------
|level          |
-----------------

process (flow chart review, required sub-table)
-----------------
|id             |
-----------------
|document_id    |
-----------------
|author_id      |
-----------------
|pre_checkerid  |
-----------------
|checker_id     |
-----------------
|next_role_id   |
-----------------
|check_status   |
-----------------

Approval stream similar to a list

Approval Flow Settings table can be configured approval hierarchies certain channel

Guess you like

Origin www.cnblogs.com/taoshihan/p/12074843.html