This is the basic idea.
We know that permissions are a combination of resources and operations, and each ASP. controls on the NET page can be seen as the carrier of this effective combination. For example, the DataGrid is the carrier for "Displaying" a type of "data" records. "display" is actually an operation, this type of "data" is a resource. Similarly, we place a Button on a company information display page to delete this company information record, this Button becomes a carrier. "delete" is an operation, and "company record information" is a resource.
After this consideration, every ASP. NET controls become the carriers of permissions, so we only need to inherit these controls and then add permission judgment statements to easily implement system permission control, in addition, the control scope can be easily extended to the page button level.
At present, the application of this idea has been implemented and successfully applied to one of my Web systems. It has received good results and can fully meet the system permission control requirements.
It has the following advantages:
1. permissions can be easily controlled to the button level
2. system permissions are not restricted by projects and independent from project development. This facilitates Component Reuse and shortens the project development progress.
3. Easy to reference. You only need to briefly configure Web. config
4. components use a standard ASP. NET control. You only need to label the Operation and Resource attributes as needed.
5. You can select a log record. The log record information is more specific.
6. Permission control is free to choose from, and provides users with friendly permission check prompts. You can define personalized prompts as needed.
7. After the system is deployed, you can easily change the permission information as needed.
The documents are being compiled ......