With resource permissions (set permissions) ideas to solve the storage problem to solve ... rights - rights possessed by the devil .NET components

   Software is not a B / S on cattle, or C / S on how the main purpose of the software is to what end users? QQ why do not you make on B / S? VS Series Why do not you make on B / S? Why do not you make SAP on B / S? Why not make an operating system on B / S? As long as meet the needs of customers no matter what B / S of C / S are possible, whether the customer is easy to use them, whether to maintain convenient, accurate positioning is more important than whether B / S or C / S, and a thought and not that it is B / S or C / S, and in so clever how to solve the problem.

 

   In fact, store permissions, see through, is a very simple thing, is, " What is the object what rights to what resources? " This logic can save ok, you like this design, others can easily read your program, easy to understand your database design, and will easily maintain some.

   With a thought around not contradictory, to achieve out of the whole system, but some is not easy, a lot of links will appear contradictory, ideas, confusion, so the time to remind themselves, their rights system is based on "what objects to what resources What rights? "the guiding ideology of the design, if contrary to this idea, it would be careful to think deeply, re-organize your thoughts.

 

What objects : determining various objects in the system is unique, and requires two parameters, a class object is a primary key object, like ERP in the Receipt (order number).

What Resources : What resources is the same, but also need a classification, a unique primary keys to identify resources.

What authority : The easiest way is to have a permission form, only the primary key to identify the uniqueness, instead of "Which + module which features" permission to identify, as it is too cumbersome, and future extensibility, maintainability Some are poor, we can not be flexible to adapt to complex situations.

 

Reference storage structure permission:

 

The following are relatively universal permissions Interface Reference:

User interface resource permissions are set as follows

The role of resource permissions are set as follows interface

Of course, the above reference interface is that from the perspective of resources on a resource, which users have which roles what authority? Permissions angle settings page.

 

Effect storage in the database as follows:

 

Above interface ideas, but also reflects: " What object has what rights to what resources? " The core guiding ideology.

 

Each software companies, software products, we need to have the persistent pursuit of people, pursue every detail of the function, the pursuit of each user feedback perfect solution, the pursuit of continuous improvement, the pursuit of spiritual impregnable fortress, in order to make the software, and then simply software, really do not penetrate so deep is very easy, so simple rights management system, and I just kept on going to improve for many years, not to mention a complex application system, you need more than N N years of careful temper we like to use in order to create a quality software system.

 

Popular parlance a little bit, and I'm content and then enter a list of functions have a look on it, it's that simple function, can be born out of "google, baidu" such a large company, let us make a simple function, there are a few individuals can really do it? Replaced by other software systems, it is the same reason, to be a real powerful, easy to use software that is not easy, is not so simple on the surface look the same, especially the analog system over others who have such feelings, not just a handful of features? A few days you can get, but often simulated, after the discovery of their own, let alone a few days, weeks are endless.

 

A lot of things, and you do not seem so simple, so simple as you think, only they do it after the discovery, deep inside the water.

 

 

 

 

Reproduced in: https: //my.oschina.net/iwenr/blog/227735

Guess you like

Origin blog.csdn.net/weixin_34415923/article/details/91675321