Database Design Series [04] adding the organizational structure to the permission system

Source: Internet
Author: User
ArticleDirectory
    • 1 Introduction
    • 2. New Requirements: Organizational Structure
    • 3. Permission model after the organizational structure is added
    • 4. Summary
1 Introduction

Next, I wrote "Database Design Series [03] Permission System" in the previous article. In the previous article, I just briefly introduced the role-based and operational access control model to control permissions to pages and buttons. CDM diagram:

2. New Requirements: Organizational Structure

For example, a large mobile phone sales company has such a department position structure:

The following requirements are available:

1> require users to assign permissions by Apple department manager and Nokia department manager... Rather than a department manager;

2> require statistics on the sales performance of Apple department managers and Nokia department managers;

When these requirements are met, the permission model in the previous article cannot meet the requirements.

3. Permission model after the organizational structure is added

We do not consider the department information first, so that only the position information is left in the above structure diagram. The first response to this requirement modeling is to build a post tree structure. However, Apple's department manager and Nokia department manager have two completely different roles and resource entity associations, and their associations are the same, resulting in data redundancy. If the position structure is small, this is not a problem. CDM:

This permission model is no different from the previous model. It only makes the post into a tree structure to meet new requirements.

3.2

However, if the organizational structure is very large, the job entity and the job permission entity will also become very large, and it will be difficult to configure the permission.

In the organization chart, we can see that Apple department managers and Nokia department managers are at the same job level, that is, they are an example of department managers. For example, ** sales personnel are sales personnel. Therefore, there is a job instance entity, and they have a parent node relationship. Finally, you can assign job instances to users. CDM:

Postorganization: stores the information of the job instance, that is, the post structure diagram above.

3.3 Add Department Information

Tired, directly, do not explain>. <. CDM:

In this model, we can solve this problem: when there are new customers in the Apple department, we can email all the people in the department.

4. Summary

This article mainly discusses how to add the organization structure information to the permission system. This article is just a reference. What's wrong, what's wrong, and what's wrong? I hope you can give me some advice.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.