Temporary permission to design mistakes

    Recently we received a need to add a function of the access control point demand. Since there is no previous authority to consider the design of this piece, which is to allow administrators to
Operation, but with the development and the actual needs of the business, using an administrator account to do considerable inconvenience. So we decided to add this access control points.
Specifically, this demand that we, in fact, is not difficult. Batch import is to give the customer, the customer bulk editing, batch update adds a new customer
And permission to modify. At first I think is very simple, after receiving the demand, I understand clearly, and after BA and confirmation is completed, it will be the task to another account
Colleagues development. Naturally this task has not so difficult to imagine, will soon complete development and unit testing. But after testing the testers found
A strange Bug, that is, when the new batch and batch modify permissions selected simultaneously, will overwrite each other, that is, if you select both new and
Modify the permissions, then I am sorry, it can only be saved to a database.
So I find it very strange to the next track, and view the database permissions set, the question arises, the original batch import and bulk editing is shared
A picture, a picture not only, but also merge together when the original design point of privilege, only a point ID to record these two pictures.
So if you choose to view and bulk import of new features, and at the same time chose to bulk edit view and modify function, then save the database
When the cover of the former with the latter. Of course, this problem is not unsolvable, only separating these two functions of authority point to two record stores, but do not
Together, of course, you can also use a special method to deal with this two privileges, but certainly this is not the best way to deal with.
The best is when will these two are completely separate at the beginning of the design authority, in order to avoid post-maintenance and upgrades and business changes, the cost of change is too big. Control permissions
Preferably down to a picture, a recording control, do not think easy, with combined together. Today this experience to be combined price.

Reproduced in: https: //www.cnblogs.com/kevinGao/p/3589975.html

Guess you like

Origin blog.csdn.net/weixin_33728708/article/details/93767083